Fix a Circular Reference in an Excel IF Formula
Question details
Use an IF formula to return a negative source value, return zero for a positive value, and avoid a circular reference.

- Product
- Microsoft Excel
- Device & OS
- not provided
- Scenario
- A user wants to evaluate a numeric value in one cell and display the result in another cell.
- Observed behavior
- The formula should return the negative value when the source is below zero, zero when it is positive, and a blank when it equals zero, without referring back to its own result.
Identify the cell containing the original value and choose a different cell for the result. Make sure the source cell does not depend on the result cell through another formula.
Put the IF Formula in a Separate Result Cell
Use this approach when you need to test a source value without making the formula refer to itself.
Select the cell containing the value to test. For this example, the source is B2.
Select C2 and enter =IF(B2<0,B2,IF(B2>0,0,"")), then press Enter.
Change the value in B2 to test the formula: a negative value appears unchanged, a positive value returns 0, and zero displays a blank.

Find and Remove an Existing Circular Reference
Use Excel's formula-checking tools if a circular reference warning still appears.
Use the Same IF Formula in WPS Spreadsheet
Open your workbook in WPS Spreadsheet and place the IF formula in a separate result cell to evaluate negative, positive, and zero values without a circular reference.
- 1. Open the workbook: Open WPS Spreadsheet and use Open to select your Excel workbook.
- 2. Identify the source cell: Locate the value you want to test, such as the number in B2.
- 3. Enter the IF formula: Select a different cell, such as C2, enter =IF(B2<0,B2,IF(B2>0,0,"")), and press Enter.
- 4. Verify and save: Check that B2 does not depend on C2, test the result with a few values, and use File > Save or Save As to save the workbook.

Frequently Asked Questions
Why does my IF formula cause a circular reference?
A circular reference occurs when a formula refers to its own cell, either directly or through other formulas. Put the formula in a separate result cell and make sure the source cell does not depend on that result.
What happens when the source value is zero?
The formula =IF(B2<0,B2,IF(B2>0,0,"")) displays a blank when B2 equals zero. It returns 0 only when B2 is positive.
Where can I find circular references in Excel?
Open the Formulas tab, select the arrow next to Error Checking, and point to Circular References. Select a listed cell to inspect its formula.
Can I use the same formula in WPS Spreadsheet?
Yes. Open the workbook in WPS Spreadsheet and enter the formula in a cell other than the source cell. For example, enter the formula in C2 if the value being tested is in B2.




