Function Problems

How to Return the Last Numeric Value in WPS Spreadsheets When Cells Contain IF Formulas

Emma BrownEmma Brown Nov 13, 2026 870 views

Question details

The user needs a formula that returns the last actual numeric value from a range when some formulas return empty strings, because COUNTA and INDEX can return a blank result.

How to Return the Last Numeric Value When Cells Contain IF Formulas in WPS Spreadsheets
Product
WPS Spreadsheets
Device & OS
not provided
Scenario
The user is working with a column where IF formulas may output empty strings and needs to extract the last numeric result for further analysis or reporting.
Observed behavior
INDEX combined with COUNTA may return a blank cell because COUNTA counts formula cells even when they evaluate to an empty string.
Before you start

Confirm that your WPS Spreadsheets version supports the functions used: INDEX and MATCH work in most versions, while TAKE and FILTER require current dynamic array support.

Solution 1Recommended

Use INDEX and MATCH to Return the Last Numeric Value in a Range

Use this method in WPS Spreadsheets or Excel when you need broad compatibility and want to ignore IF formula cells that return empty strings.

MATCH with 99^99 searches for a very large numeric value and returns the position of the last numeric cell in the range, so formula cells that evaluate to empty text are ignored.

1
Select the result cell

Click the cell where you want the last numeric value to appear, for example D2.

2
Enter the INDEX and MATCH formula

Type =INDEX(C6:C301,MATCH(99^99,C6:C301)) and press Enter. Replace C6:C301 with your actual data range.

3
Confirm the returned value

Check that the cell displays the last numeric value from the range instead of a blank formula result.

Use INDEX and MATCH to Return the Last Numeric Value in a Range
Result: The formula returns only the last numeric value and skips cells whose IF formulas evaluate to an empty string.
WPS Spreadsheets formula solution

Return the Last Numeric Value in WPS Spreadsheets Without Blank IF Results

Use the INDEX and MATCH formula directly in WPS Spreadsheets to locate the last numeric value in a range and ignore cells where IF formulas return empty strings. WPS Office keeps your Excel formulas working while offering a free, lightweight spreadsheet environment.

  1. 1. Open WPS Spreadsheets: Launch WPS Office and open the workbook that contains the column with IF formulas.
  2. 2. Select the result cell: Click the cell where you want the last numeric value to appear.
  3. 3. Enter the formula: Type =INDEX(C6:C301,MATCH(99^99,C6:C301)) and press Enter, replacing C6:C301 with your actual data range.
  4. 4. Verify the result: Confirm that the cell shows the last numeric value from the range instead of a blank formula result.
Returns the last numeric value even when IF formulas produce empty stringsKeeps full compatibility with Microsoft Excel XLSX files and formulasWorks directly in WPS Spreadsheets without changing your existing workbook formulasFree and lightweight Office alternative with a familiar ribbon interface
microsoft office alternative - wps office

Frequently Asked Questions

Why does INDEX and COUNTA return a blank when cells contain IF formulas?

COUNTA counts cells that contain formulas, even if the formula returns an empty string (""). INDEX then selects that counted cell, so the result can be blank. Use MATCH(99^99,C6:C301) to search for the last numeric value instead.

Can I use these formulas in WPS Spreadsheets and Excel?

Yes. The INDEX and MATCH formula works in WPS Spreadsheets and traditional Excel versions. The TAKE and FILTER method requires Excel 365 or a WPS Spreadsheets version that supports dynamic arrays.

How do I change the formula range from C6:C301 to my own data?

Select the cell containing the formula, click in the formula bar, and replace C6:C301 with your actual range. Press Enter to recalculate and return the last numeric value in the new range.

What should I do if the TAKE and FILTER formula returns a #NAME? error?

Your version may not support dynamic array functions. Use the INDEX and MATCH formula instead, or update WPS Office to a version that supports TAKE and FILTER.

Does the formula include zero values in the result?

Yes, MATCH(99^99,C6:C301) treats zero as a numeric value and can return it as the last numeric result. If you need to ignore zeros, use a separate conditional formula.