Function Problems

How to Find the Last Visible Non-Blank Cell in an Excel Column

Emma BrownEmma Brown Nov 3, 2026 870 views

Question details

The user needs to retrieve the value of the last visible and non-empty cell within a specific spreadsheet column dynamically, without relying on VBA macros.

How to Find the Last Visible Non-Blank Cell in an Excel Column
Product
Excel / WPS Spreadsheet
Device & OS
not provided
Scenario
Working with filtered or hidden rows in a dataset and needing to extract the final visible data entry using built-in functions.
Observed behavior
Standard functions retrieve the last data point regardless of row visibility, meaning values from hidden rows or empty cells are incorrectly returned instead of the actual last visible cell.
Before you start

Ensure your target data range is clearly defined and verify that the column does not contain preexisting formula error values, as these will disrupt array formula calculations.

Solution 1

Use a Standard LOOKUP Formula (For Unfiltered Data)

This straightforward LOOKUP formula is ideal when you simply need to find the last non-blank cell in a column where no rows are hidden or filtered.

If you are not using data filters and only need to ignore empty cells, the standard LOOKUP function evaluates the entire array and retrieves the final populated string or number.

1
Select the Destination Cell

Click on the specific cell where you want the final result to be displayed.

2
Input the LOOKUP Formula

Type the formula =LOOKUP(2,1/(B:B<>""),B:B) directly into the formula bar. Replace 'B:B' with your actual target column letter.

3
Execute the Function

Press Enter. The formula checks for cells that are not empty and fetches the last matching value in the referenced column.

Use Advanced Formulas in WPS Spreadsheet

Effortlessly Manage Complex Data Arrays in WPS Spreadsheet

WPS Spreadsheet offers robust, built-in support for advanced array functions including LOOKUP, SUBTOTAL, and dynamic ranges. Easily calculate and retrieve specific data points like the last visible cell while dealing with heavy data filtering.

  1. 1. Open Your Data File: Launch WPS Spreadsheet and open the XLSX or CSV file containing the data you want to analyze.
  2. 2. Apply Data Filters: Navigate to the Data tab and click AutoFilter to easily hide or show specific rows based on your criteria.
  3. 3. Insert the Formula: Select an empty output cell and paste the LOOKUP and SUBTOTAL array formula to instantly extract the final visible, non-blank entry.
100% compatible with Microsoft Excel formulas and XLSX file formats.Completely free to download with a lightweight, fast installation.Supports complex array formulas, conditional formatting, and dynamic AutoFilters.Intuitive tabbed interface makes managing multiple workbooks effortless.
microsoft office alternative - wps office

Frequently Asked Questions

Why does the basic INDEX and MATCH formula still return values from hidden cells?

Standard lookup functions like INDEX, MATCH, and VLOOKUP evaluate the underlying raw data regardless of row visibility. To ignore filtered rows, you must incorporate functions specifically designed to test for visibility, such as SUBTOTAL or AGGREGATE.

Can I use the AGGREGATE function to find the last visible cell?

Yes. AGGREGATE can be used with function number 14 (LARGE) or 15 (SMALL) and option 5 (ignore hidden rows). When nested with INDEX, it provides a highly efficient way to retrieve the final visible non-blank value without using volatile functions like OFFSET.

Does the LOOKUP formula work for both text and numerical data?

Yes, the formula =LOOKUP(2,1/(B:B<>""),B:B) handles both text strings and numerical values seamlessly. This is because the criteria <>"" simply checks for any cell that is strictly not equal to an empty string, regardless of the data type.