How to Use an IF Formula to Return Zero for Declined Cases in Excel
Question details
The user wants to display the value 0 if a specific cell contains the word 'Declined', while keeping the original values for other statuses like 'Open' or 'Closed'.

- Product
- Excel
- Device & OS
- not provided
- Scenario
- Modifying output values based on text conditions without overwriting the original data in the spreadsheet.
- Observed behavior
- Users need a formula to conditionally replace a cell's output with zero, but placing the formula in the original data cell causes a circular reference or overwrites the data.
Ensure you have a designated helper column ready to input the formula, as placing it in the same cell as your original data will result in a circular reference error.
Use a Standard IF Formula (Case-Insensitive)
This method replaces values with zero when the status is 'Declined', regardless of text casing.
By utilizing a helper column, you can evaluate the status column and output either a 0 or the original data without causing conflicts.
Select a blank cell in a new column (helper column) corresponding to your data row, such as C2.
Enter the formula `=IF(A2="Declined",0,B2)`, assuming A2 contains the status and B2 contains your original value.
Press Enter to apply the formula, then click and drag the fill handle (the small square at the bottom-right corner of the cell) down to apply it to the rest of the column.

Use the EXACT Function for Case-Sensitive Conditions
Use this approach if you specifically only want to target the exact word 'Declined' with an uppercase 'D' and lowercase remainder.
Easily Manage IF Formulas and Helper Columns with WPS Spreadsheet
WPS Spreadsheet provides intuitive formula assistance, making it easy to set up IF conditions, manage helper columns, and format your data conditionally without errors.
- 1. Open WPS Spreadsheet: Launch WPS Office and open your spreadsheet file containing the status data.
- 2. Insert the IF Formula: Select a cell in an empty helper column and type the IF or EXACT formula based on your conditional requirement.
- 3. Drag to Fill: Hover over the bottom-right corner of the cell until the cross cursor appears, then drag down to dynamically apply the formula to all rows.

Frequently Asked Questions
Why does my formula return a circular reference error?
A circular reference occurs when a formula directly or indirectly refers to its own cell. To fix this, always enter your IF formula in a new helper column, not in the cell containing the original data you are trying to reference.
Will this formula affect my existing conditional formatting?
No, conditional formatting rules based on the 'Open', 'Closed', or 'Declined' text in your status column will continue to function independently of the formula placed in your helper column.
Can I use this method if my original column is generated by another formula?
Yes. The helper column formula will evaluate the final output of the formula in your original column. If the specific condition is met, it will successfully return 0.




