Function Problems

How to Return the Last Nonblank Value in a Variable Excel Column

Steven ParkerSteven Parker Nov 10, 2026 868 views

Question details

The user needs to retrieve the last displayed or nonblank value in an Excel column that dynamically changes length based on other formulas or inputs.

How to Return the Last Nonblank Value in a Variable Excel Column
Product
Excel
Device & OS
not provided
Scenario
Extracting the final value from a dynamic data column, such as a mortgage payment schedule, where trailing rows may become blank or hidden due to formula recalculations.
Observed behavior
The target cell needs to dynamically update to show the last visible data point without capturing empty cells generated by underlying formulas.
Before you start

Determine whether your target column contains purely numeric data (like dates or currency), exclusively text, or a mixture of both, as this will dictate which formula you should use.

Solution 1Recommended

Find the Last Numeric Value Using LOOKUP

Use the LOOKUP function with an intentionally large number to find the last cell containing a numeric value or date.

The LOOKUP function ignores errors and empty cells. By searching for an extremely large number (9.99E+307, the largest number Excel can handle), LOOKUP will bypass empty formula results and default to the last numeric value in the specified range.

1
Select the target cell

Click on the cell where you want the final extracted value to be displayed.

2
Enter the LOOKUP formula

Type =LOOKUP(9.99999999999999E+307, K:K) into the formula bar, replacing K:K with your actual target column.

3
Apply the formula

Press Enter. The cell will now dynamically display the last numeric value or date present in the column.

Find the Last Numeric Value Using LOOKUP
Dynamic Updates: When the column length shrinks due to your mortgage table calculations, this formula will automatically adjust to show the new last numeric value.
Advanced Spreadsheet Functions

Handle Dynamic Data Easily with WPS Spreadsheet

WPS Office provides a powerful, free Spreadsheet tool that fully supports advanced LOOKUP, INDEX, and dynamic array formulas. You can seamlessly calculate variable-length schedules without dealing with broken formulas.

  1. 1. Open your file in WPS Spreadsheet: Launch WPS Office, click on 'Spreadsheet', and open your financial or mortgage document.
  2. 2. Select the result cell: Click the empty cell where you want to return the last visible value of your table.
  3. 3. Insert the lookup formula: Type the formula =LOOKUP(9.99999999999999E+307,K:K) directly into the formula bar and press Enter.
  4. 4. Watch the data update dynamically: As you change inputs and the column shortens, WPS Spreadsheet will instantly recalculate and display the new final value.
Fully compatible with Microsoft Excel formulas including LOOKUP, INDEX, and MATCHFree to download and use with a highly familiar, intuitive interfaceLightweight application that handles large financial datasets smoothlyBuilt-in templates for financial planning and automated mortgage schedules
microsoft office alternative - wps office

Frequently Asked Questions

Why does my formula return a zero instead of the last value?

This usually happens if the formula references a cell that contains a formula returning an empty string ("") or a zero value. Ensure you are using the INDEX and MAX array formula if your column contains formula-generated blank cells, as standard LOOKUP might capture those empty strings.

Does the LOOKUP 9.99E+307 trick work for dates?

Yes. In spreadsheets, dates are stored as underlying numeric values (serial numbers). The LOOKUP formula searching for an extremely large number will successfully find and return the last date in a column.

How can I find the last visible value if rows are manually hidden?

The standard LOOKUP and INDEX formulas do not differentiate between manually hidden rows and visible rows. To ignore manually hidden rows, you must use a combination involving the AGGREGATE or SUBTOTAL functions, which are designed to explicitly ignore hidden rows.