• Skip to main content
  • Skip to header right navigation
  • Skip to site footer

My Online Training Hub

Learn Dashboards, Excel, Power BI, Power Query, Power Pivot

  • Courses
  • Pricing
    • Free Courses
    • Power BI Course
    • Excel Power Query Course
    • Power Pivot and DAX Course
    • Excel Dashboard Course
    • Excel PivotTable Course – Quick Start
    • Advanced Excel Formulas Course
    • Excel Expert Advanced Excel Training
    • Excel Tables Course
    • Excel, Word, Outlook
    • Financial Modelling Course
    • Excel PivotTable Course
    • Excel for Customer Service Professionals
    • Excel for Operations Management Course
    • Excel for Decision Making Under Uncertainty Course
    • Excel for Finance Course
    • Excel Analysis ToolPak Course
    • Multi-User Pricing
  • Resources
    • Free Downloads
    • Excel Functions Explained
    • Excel Formulas
    • Excel Add-ins
    • IF Function
      • Excel IF Statement Explained
      • Excel IF AND OR Functions
      • IF Formula Builder
    • Time & Dates in Excel
      • Excel Date & Time
      • Calculating Time in Excel
      • Excel Time Calculation Tricks
      • Excel Date and Time Formatting
    • Excel Keyboard Shortcuts
    • Excel Custom Number Format Guide
    • Pivot Tables Guide
    • VLOOKUP Guide
    • ALT Codes
    • Excel VBA & Macros
    • Excel User Forms
    • VBA String Functions
  • Members
    • Login
  • Blog
  • Excel Webinars
  • Excel Forum
    • Register as Forum Member
  • Login

Find the Last Value in a Column

You are here: Home / Excel Formulas / Find the Last Value in a Column
Find the Last Value in a Column
May 24, 2012 by Mynda Treacy

The other day a member emailed me the following question:

“I created a check book in Excel 2010 and I was able to figure out the running balance which basically adds, subtracts accordingly and it gives me a running balance.

My question is; is there a way to display that running balance (considering it keeps changing rows with each new entry) in another cell?

I am trying to create a cell near the top of the worksheet that also displays my current balance and well as within the worksheet.

Any thoughts?

Steve.”

Let's assume Steve has a worksheet something like the example below, and he wants a formula that updates to find the last value in the 'Balance' column, like the one in cell C3:

Excel INDEX & MATCH find last value in column

It's actually quite easy. With some clever use of the INDEX and MATCH functions we can use the following formula:

=INDEX(D6:D500,MATCH(9.99999999999999E+307,D6:D500))

I've also used this formula in cell B3 to get the latest date from column A, like this:

=INDEX(A6:A500,MATCH(9.99999999999999E+307,A6:A500))

You can do the same for a row, just change the cell references to reference a row rather than a column. For example:

=INDEX(C2:X2,MATCH(9.99999999999999E+307,C2:X2))

Finding the Last Text Value

The above formulas work if the data in your range is numeric.

But if it’s text you want to look up then you’ll need this formula:

=INDEX(D1:D500,MATCH(REPT("z",255),D1:D500))

I actually used this technique in my 'toughest Excel challenge ever' but I think it's a great technique to use on its own too.

Thanks for your question, Steve.

Find the Last Value in a Column
Mynda Treacy

Microsoft MVP logo

AUTHOR Mynda Treacy Co-Founder / Owner at My Online Training Hub

CIMA qualified Accountant with over 25 years experience in roles such as Global IT Financial Controller for investment banking firms Barclays Capital and NatWest Markets.

Mynda has been awarded Microsoft MVP status every year since 2014 for her expertise and contributions to educating people about Microsoft Excel.

Mynda teaches several courses here at MOTH including Excel Expert, Excel Dashboards, Power BI, Power Query and Power Pivot.

More Excel Formulas Posts

Excel BYROW and BYCOL Functions

Excel BYCOL and BYROW Functions

Excel BYCOL and BYROW functions fundamentally change the way we write formulas that calculate across columns and down rows.
python in excel natively

How to Use Python in Excel Natively

How to use Python in Excel natively using libraries like Pandas, NumPy, Matplotlib, Seaborn and more for analysis and spectacular charts!
excel dynamic named ranges

Excel Dynamic Named Ranges

Excel Dynamic Named Ranges update automatically to include new data in the ranges referenced in your formulas and PivotTables etc.
functions for financial modelling

Excel Functions for Financial Modeling

Top 23 must know Excel functions for Financial Modeling. Includes example Excel file and step by step instructions.
excel formula by example

Excel Formula by Example

Excel can now write a formula by example. Simply give it an example or two of the result and Excel will write the formula.
ai-aided excel formula editor

AI Aided Excel Formula Editor

Save time with this free AI Excel formula editor add-in that writes, edits, improves and interprets formulas for you!
top excel functions for data analysts

Top Excel Functions for Data Analysts

Must know Excel Functions for Data Analysts and what functions you don’t have to waste time learning and why.
excel advanced formula environment

Excel Labs (Formerly, Advanced Formula Environment)

Excel Labs is a long awaited, new improved way to write, name and store Excel formulas, including LAMBDAS with the help of AI.
Pro Excel Formula Writing Tips

Pro Excel Formula Writing Tips

Must know Excel formula writing tips, tricks and tools to make you an Excel formula ninja, including a new formula editor.
excel shaping arrays

New Array Shaping Excel Functions

The Excel Shaping Array Functions makes it easier than ever to reshape arrays and ranges using these purpose built functions


Category: Excel Formulas
Previous Post:Funky Shapes and Fills in Excel CommentsFunky Shapes and Fills in Excel Comments
Next Post:Excel COUNT Coloured CellsExcel COUNT Coloured Cells

Reader Interactions

Comments

  1. Trang

    November 11, 2014 at 7:49 pm

    Thank you for this useful formular, i’ve solved my problem issue via this technique . It;s really work and helpful.
    Best regards,

    Reply
    • Mynda Treacy

      November 11, 2014 at 8:14 pm

      You’re welcome, Trang 🙂

      Reply
  2. Martin

    July 26, 2013 at 11:48 pm

    I was surfing the net in an attempt to understand “LOOKUP(9.99999999999999E+307” when I came across your link. To me what makes this forum special is the lengths you take to explain your answers.
    and the extra mile you went in this case to show a similar formula for text.

    Thanks a million! 😀

    Reply
    • Mynda Treacy

      July 27, 2013 at 4:07 pm

      Aw, cheers Martin. Hope to have you back here from time to time. 🙂

      Reply
  3. Bob G

    May 20, 2013 at 5:03 am

    Using your Index/Match formula gives me the proper result, but I am running into a problem trying to use that result in a subsequent calculation. I am using the formula =IF(I4-J4+L4=K4,”Good”,”Bad”), where K4 represents the results of the Match Index search. I am getting a “No” result, even when the math indicates it should be a “Yes”. If I type over the Index Match result and enter the same number manually, I get the appropriate “Yes” response. Can you help?

    Reply
    • Mynda Treacy

      May 20, 2013 at 1:27 pm

      Hi Bob,

      Is it possibly a rounding issue? I would increase the number of decimal places displayed by your INDEX/MATCH result and double check the number.

      If that’s not the problem you can send me the file and I’ll take a look.

      Cheers,

      Mynda.

      Reply
  4. Shelley

    May 30, 2012 at 5:08 am

    Hello! It took me a while to figure out why this works…might have been helpful to explain that Match searches in ascending order when you omit the match_type argument! 🙂

    Reply
    • Mynda Treacy

      June 1, 2012 at 8:36 pm

      Hi Shelley,

      Thanks for your feedback. I agree the MATCH function arguments could be listed. I’ll add some additional info to the INDEX MATCH tutorial.

      To recap; the syntax for the MATCH function is:

      =MATCH(lookup_value, lookup_array, [match_type])

      Note: when match_type is omitted (which it is in the examples above) it uses the default of 1, which means it will find the largest value that is <= to the lookup_value, but there’s an exception to this rule. Here's an extract from excelbanter.com as to why it works:

      “As long as the Look_Up value is larger than any value in the Look_Up Vector (read lookup_array), it will return the last number in the vector (array).”

      In Excel the value 9.99999999999999E+307 is considered the largest value Excel can handle, which is why it is used as the lookup_value.

      Arguably you could use another number just so long as it would always be larger than any number in your array.

      I hope that helps. For more eye-glazing details read this discussion.

      Kind regards,

      Mynda.

      Reply

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Current ye@r *

Leave this field empty

Sidebar

More results...

office scripts course

Popular Content

  • 10 Common Excel Mistakes to Avoid
  • Top Excel Functions for Data Analysts
  • Secrets to Building Excel Dashboards in Less Than 15 Minutes
  • Pro Excel Formula Writing Tips
  • Hidden Excel Double-Click Shortcuts
  • Top 10 Intermediate Excel Functions
  • 5 Pro Excel Dashboard Design Tips
  • 5 Excel SUM Function Tricks
  • 239 Excel Keyboard Shortcuts

100 Excel Tips and Tricks eBook

Download Free Tips & Tricks

239 Excel Keyboard Shortcuts

Download Free PDF

mynda treacy microsoft mvpHi, I'm Mynda Treacy and I run MOTH with my husband, Phil. Through our blog, webinars, YouTube channel and courses we hope we can help you learn Excel, Power Pivot and DAX, Power Query, Power BI, and Excel Dashboards.

Blog Categories

  • Excel
  • Excel Charts
  • Excel Dashboard
  • Excel Formulas
  • Excel Office Scripts
  • Excel PivotTables
  • Excel Shortcuts
  • Excel VBA
  • General Tips
  • Online Training
  • Outlook
  • Power Apps
  • Power Automate
  • Power BI
  • Power Pivot
  • Power Query
microsoft mvp logo
trustpilot excellent rating
Secured by Sucuri Badge
MyOnlineTrainingHub on YouTube Mynda Treacy on Linked In Mynda Treacy on Instagram Mynda Treacy on Twitter Mynda Treacy on Pinterest MyOnlineTrainingHub on Facebook

Sign up to our newsletter and join over 400,000
others who learn Excel and Power BI with us.

 

Company

  • About My Online Training Hub
  • Disclosure Statement
  • Frequently Asked Questions
  • Guarantee
  • Privacy Policy
  • Terms & Conditions
  • Testimonials
  • Become an Affiliate
  • Sponsor Our Newsletter

Support

  • Contact
  • Forum
  • Helpdesk – For Technical Issues

Copyright © 2023 · My Online Training Hub · All Rights Reserved. Microsoft and the Microsoft Office logo are trademarks or registered trademarks of Microsoft Corporation in the United States and/or other countries. Product names, logos, brands, and other trademarks featured or referred to within this website are the property of their respective trademark holders.

Download A Free Copy of 100 Excel Tips & Tricks

excel tips and tricks ebook

We respect your privacy. We won’t spam you.

x