XL: Using OFFSET, MATCH, and MAX to Return Last Value in RangeLast reviewed: February 2, 1998Article ID: Q152407 |
The information in this article applies to:
SUMMARYBy using a combination of the OFFSET, MAX, and MATCH functions in a worksheet formula, you can have Microsoft Excel return the value of the last valid cell in a range of cells.
MORE INFORMATIONThe following example formula will find the value of the last valid cell in a row
=OFFSET(<StartCell>,0,MATCH(MAX(Range)+1,<Range>,1)-1)where <StartCell> is the address of the first cell of a range, and <Range> is the address of the cells containing the data. The following example formula will find the value of the last valid cell in a column:
=OFFSET(<StartCell>,MATCH(MAX(<Range>)+1,Range,1)-1,0)where <StartCell> is the address of the first cell of a range, and <Range> is the address of the cells containing the data.
Example 1This example demonstrates using both formulas to find the value of the last valid cell in both a row and a column.
Example 2This example uses a check book to demonstrate how to always display the current balance of the check book.
ARTICLE-ID: Q139574 TITLE : Returning the Address of the Cell with Largest or Smallest Value ARTICLE-ID: Q142526 TITLE : How to Determine Top and Bottom Used Cells in a Sparse Array ARTICLE-ID: Q85234 TITLE : Excel: Formula To Find Last Valid Cell in a Range REFERENCES
Microsoft Excel 97 and Microsoft Excel 98 Macintosh EditionFor more information about the OFFSET, MATCH, and MAX functions in Microsoft Excel 97 and Microsoft Excel 98 Macintosh Edition, click Microsoft Excel Help on the Help menu and type one of the following:
Offset Match Max Microsoft Excel 7.0For more information about the OFFSET, MATCH, and MAX functions in Microsoft Excel version 7.0, click Answer Wizard on the Help menu and type:
Offset Match Max Microsoft Excel 5.0For more information about the OFFSET, MATCH, and MAX functions in Microsoft Excel version 5.0, click the Search button in Help and type:
Offset Match Max |
Additional query words: 98 8.00 XL97
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |