Function Problems

Return the Latest Value from an Excel Range

Rana GarciaRana Garcia Nov 18, 2026 868 views

Question details

Find a formula that returns the last nonblank value in a changing range or the value associated with the most recent date.

Return the Latest Value from an Excel Range
Product
Microsoft Excel
Device & OS
not provided
Scenario
A worksheet receives new values over time, and a separate cell should display the latest relevant value.
Observed behavior
The result cell should update as the source range changes, using either row position or the most recent date to determine the result.
Before you start

Identify the value range and decide whether latest means the bottommost nonblank entry or the entry with the most recent date. For a date-based lookup, make sure the dates are valid spreadsheet dates and align with the values in the same rows.

Solution 1Recommended

Return the Last Nonblank Value in an Excel Range

Use this formula when new entries appear toward the bottom of a column.

1
Select the result cell

In Excel, click the cell where you want to display the latest value.

2
Enter the LOOKUP formula

Type =LOOKUP(2,1/(A2:A1000<>""),A2:A1000) and press Enter. Replace both references to A2:A1000 with your value range.

3
Test the result

Enter a value in a lower row within the selected range and check that the result cell updates.

Return the Last Nonblank Value in an Excel Range
Row position determines the result: This formula returns the bottommost nonblank value, not necessarily the most recently edited cell. If the range has no nonblank values, it returns #N/A.
Work with spreadsheet formulas

Find the Latest Range Value in WPS Spreadsheet

Use WPS Spreadsheet to return the bottommost nonblank value or look up the value associated with the latest date.

  1. 1. Open the worksheet: Open WPS Spreadsheet and select Open to load your workbook.
  2. 2. Select the result cell: Click an empty cell where the latest value should appear.
  3. 3. Enter a formula: For the last nonblank value, enter =LOOKUP(2,1/(A2:A1000<>""),A2:A1000). For a value in column A associated with the latest valid date in column B, enter =INDEX(A2:A1000,MATCH(MAX(B2:B1000),B2:B1000,0)). Press Enter.
  4. 4. Adjust and test: Replace the example ranges with your own, then change or add a value within the source range and check the result cell.
Return the last nonblank entry with a LOOKUP formulaFind a value associated with the most recent dateOpen and edit Microsoft Excel XLSX filesWork in a familiar spreadsheet interface
microsoft office alternative - wps office

Frequently Asked Questions

Does the last nonblank formula find the most recently edited cell?

No. The LOOKUP formula returns the bottommost nonblank value in the specified range. It does not track when cells were edited.

What happens if multiple rows have the latest date?

The XLOOKUP and INDEX/MATCH examples return the value from the first row matching the maximum date.

Why does the last nonblank formula return #N/A?

The range may contain no nonblank values. Check A2:A1000 or your replacement range for an entry; formulas that return an empty string are treated as blank by this formula.

Will the formula include new rows beyond row 1000?

No. Edit both range references in the formula to include the additional rows, such as A2:A2000.