Formula Errors

Fix a Circular Reference in an Excel IF Formula

Adam DavisAdam Davis Nov 25, 2026 869 views

Question details

Use an IF formula to return a negative source value, return zero for a positive value, and avoid a circular reference.

Fix a Circular Reference in an Excel IF Formula
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.
Before you start

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.

Solution 1Recommended

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.

1
Locate the source value

Select the cell containing the value to test. For this example, the source is B2.

2
Enter the formula elsewhere

Select C2 and enter =IF(B2<0,B2,IF(B2>0,0,"")), then press Enter.

3
Check the result

Change the value in B2 to test the formula: a negative value appears unchanged, a positive value returns 0, and zero displays a blank.

Put the IF Formula in a Separate Result Cell
Keep the references independent: Do not enter this formula in B2, and ensure B2 does not depend on C2 through another formula. Either situation can create a circular reference.
Work with formulas in WPS Spreadsheet

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. 1. Open the workbook: Open WPS Spreadsheet and use Open to select your Excel workbook.
  2. 2. Identify the source cell: Locate the value you want to test, such as the number in B2.
  3. 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. 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.
Evaluate negative and positive values with an IF formulaOpen and edit Microsoft Excel XLSX and XLS filesUse a familiar spreadsheet interfaceSave the edited workbook in an Excel-compatible format
microsoft office alternative - wps office

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.