WPS Spreadsheet: Fix a #REF! Error in a RANK Formula with INDIRECT
Question details
The user needs to resolve a #REF! error in a ranking formula that combines IF, RANK, and 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.
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.
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.
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.
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.
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.
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.
Press Enter after correcting the reference, then verify that the IF and RANK formula returns a numeric ranking instead of #REF!.

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. Open your workbook: Launch WPS Office, choose Spreadsheet, and open the workbook containing the #REF! formula.
- 2. Inspect the error cell: Select the error cell and use the Formula Bar to review the IF, RANK, INDIRECT, and ADDRESS components.
- 3. Correct the reference: Replace incorrect regional separators and fix the ADDRESS arguments so the generated range begins at a valid cell.
- 4. Verify the ranking: Press Enter and confirm that the formula returns the expected rank without a #REF! error.

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.




