Please Note: This article is written for users of the following Microsoft Excel versions: 2007 and 2010. If you are using an earlier version (Excel 2003 or earlier), this tip may not work for you. For a version of this tip written specifically for earlier versions of Excel, click here: Referencing the Last Cell in a Column.
by Allen Wyatt
(last updated June 24, 2019)
Patty asked about a common scenario, in which column B contains quite a bit of data, and information can be added to the cells in the column at any time. In a formula in cell C4, Patty wants to see the value at the bottom of those cells in column B that contain values. Thus, if cells B1:B27 contain data, then in cell C4 Patty wants to see the value that is in cell B27. If three more pieces of data are added to column B, then the value in C4 should contain the value in B30.
The solution to this problem depends on whether you can count on the data in column B containing blank cells or not. If the data is contiguous—it doesn't contain any blank cells—then you can use the following formula in C4:
This constructs an address based on the last cell in the column, and then uses the INDIRECT function to return the value at that address.
If it is possible for there to be blanks in column B, then the following formula will work:
Again, the INDIRECT function is used to fetch the actual value, but the address used by INDIRECT is put together differently.
A different approach is to use the VLOOKUP function to return the value. If column B consists of numeric values, then the following formula in C4 will work just fine:
If column B contains text, then the numeric lookup won't work, but the following will:
ExcelTips is your source for cost-effective Microsoft Excel training. This tip (11030) applies to Microsoft Excel 2007 and 2010. You can find a version of this tip for the older menu interface of Excel here: Referencing the Last Cell in a Column.
Program Successfully in Excel! John Walkenbach's name is synonymous with excellence in deciphering complex technical topics. With this comprehensive guide, "Mr. Spreadsheet" shows how to maximize your Excel experience using professional spreadsheet application development tips from his own personal bookshelf. Check out Excel 2013 Power Programming with VBA today!
If you hide the first rows of a worksheet, you may have a hard time getting those rows visible again. Here's a simple way ...Discover More
When you are copying a cell from one place to another (perhaps even to a different worksheet), you may not want to copy ...Discover More
The radical symbol is used frequently in some branches of mathematics. If you want to insert a radical symbol in a cell, ...Discover More
FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."
Got a version of Excel that uses the ribbon interface (Excel 2007 or later)? This site is for you! If you use an earlier version of Excel, visit our ExcelTips site focusing on the menu interface.