Formula Errors

WPS Spreadsheet: Fix a #REF! Error in a RANK Formula with INDIRECT

Tauseeq MagsiTauseeq Magsi Nov 12, 2026 870 views

Question details

The user needs to resolve a #REF! error in a ranking formula that combines IF, RANK, and INDIRECT.

WPS Spreadsheet: Fix a #REF! Error in a RANK Formula with INDIRECT
Product
WPS Spreadsheet
Device & OS
not provided
Scenario
A dynamic ranking range is created by combining ADDRESS functions inside another formula, then passed to INDIRECT for use by RANK.
Observed behavior
The formula returns a #REF! error because the generated reference may use incorrect regional separators or point to an empty top-left cell.
Before you start

Open the formula in the formula bar and identify the part that generates the range address. Check the spreadsheet's regional list separator and inspect the generated address text before changing the RANK or IF logic.

Solution 1Recommended

Correct the generated INDIRECT range and regional separators

Use this solution when the #REF! error comes from an ADDRESS-built reference, an incorrect separator, or an invalid starting cell.

INDIRECT can only evaluate a valid cell or range reference. If your regional settings require semicolons, use semicolons between ADDRESS functions or other formula arguments instead of commas or periods. Also verify that the generated range starts at a populated, valid cell.

1
Open the ranking formula

Select the cell showing #REF! and review the complete formula in the Formula Bar. Locate the ADDRESS functions and the INDIRECT portion of the formula.

2
Use the correct regional separator

Edit the formula directly in the Formula Bar and replace incorrect commas or periods between ADDRESS functions and arguments with the separator required by your locale, commonly a semicolon.

3
Check the generated starting reference

Review the row and column values supplied to the first ADDRESS function. Make sure the resulting top-left cell is a valid cell in the worksheet and is not an empty or invalid reference.

4
Test the range before ranking

Temporarily select the INDIRECT portion of the formula in the Formula Bar and press Enter to test it, or place the INDIRECT expression in a separate cell. Confirm that it returns a valid range before restoring it inside RANK.

5
Recalculate the formula

Press Enter after correcting the reference, then verify that the IF and RANK formula returns a numeric ranking instead of #REF!.

Correct the generated INDIRECT range and regional separators
Check the first invalid reference: If several cells show #REF!, trace the generated range from its first ADDRESS function. A single invalid top-left reference can cause the entire INDIRECT-based ranking formula to fail.

Build and troubleshoot dynamic ranking formulas in WPS Spreadsheet

WPS Spreadsheet lets you inspect and edit IF, RANK, ADDRESS, and INDIRECT formulas in one familiar worksheet interface. Use the formula bar and cell-by-cell testing to correct dynamic references and maintain compatible spreadsheet files.

  1. 1. Open your workbook: Launch WPS Office, choose Spreadsheet, and open the workbook containing the #REF! formula.
  2. 2. Inspect the error cell: Select the error cell and use the Formula Bar to review the IF, RANK, INDIRECT, and ADDRESS components.
  3. 3. Correct the reference: Replace incorrect regional separators and fix the ADDRESS arguments so the generated range begins at a valid cell.
  4. 4. Verify the ranking: Press Enter and confirm that the formula returns the expected rank without a #REF! error.
Inspect and correct RANK and INDIRECT formulas directly in the Formula BarTest ADDRESS-generated ranges before using them in a ranking calculationWork with familiar spreadsheet tools and a lightweight WPS Office interfaceOpen, edit, and save Microsoft Excel .xlsx and .xls files with broad format compatibility
microsoft office alternative - wps office

Frequently Asked Questions

Why does INDIRECT return a #REF! error in a RANK formula?

INDIRECT returns #REF! when the text supplied to it is not a valid cell or range reference. Check the ADDRESS output, separators, sheet references, and row or column values used to create the range.

Should I use commas or semicolons in the ADDRESS formula?

Use the argument separator configured for your regional settings. In many locales it is a semicolon rather than a comma. Entering the wrong separator can prevent ADDRESS or the combined reference from being interpreted correctly.

Can an empty top-left cell cause the first #REF! error?

Yes. If the generated range starts with an invalid or empty top-left reference, the INDIRECT expression may fail before RANK processes the range. Verify that the first ADDRESS points to a valid worksheet cell.

How can I test the INDIRECT range separately?

Copy the INDIRECT expression into a temporary cell or select that expression in the Formula Bar and evaluate it. Confirm that it resolves to a valid range before placing it back inside the RANK formula.