where data is the named range B5:D14. Note: this is an array formula and must be entered with control + shift + enter, except in Excel 365, where dynamic array formulas are native. To get the last row used, we use the ROW function together with the MAX function like this: Because data contains more than one row, ROW returns an array of row numbers: This array goes directly to the MAX function, which returns the largest number: To get the last column, we use the COLUMN function in the same way: Since data contains three rows, COLUMN returns an array with three column numbers: and the MAX function again returns the largest number: Both results are returned directly to the ADDRESS function, which constructs a reference to the cell at row 14, column 4: If you want a relative address instead of an absolute reference, you can supply 4 for the third argument like this:

CELL function alternative

Although it’s not obvious, the INDEX function returns a reference, so we can use the CELL function with INDEX to get the address of the last cell in a range like this: In this case, we use the INDEX function to get a reference to the last cell in the range, which we determine by passing total rows and total columns for the range data into INDEX. We get total rows with the ROWS function, and total columns with the COLUMNS function: With the array provided as data, INDEX then returns a reference to cell D14: We then use the CELL function with “address”, to display the address. Note: The CELL function is a volatile function which can cause performance problems in large or complex workbooks.

Dave Bruns

Hi - I’m Dave Bruns, and I run Exceljet with my wife, Lisa. Our goal is to help you work faster in Excel. We create short videos, and clear examples of formulas, functions, pivot tables, conditional formatting, and charts.