Return a Value from Another Column with an IF Formula in WPS Spreadsheets
Question details
Return the value from column I when column EK is zero; otherwise, calculate the result without dividing by zero.

- Product
- WPS Spreadsheets and Microsoft Excel
- Device & OS
- not provided
- Scenario
- A worksheet needs a conditional formula in column N that either returns a value from column I or calculates J divided by BX and multiplied by CA.
- Observed behavior
- Column N should return I when EK is zero, return zero when BX is zero, and otherwise calculate J/BX*CA.
Confirm that your data starts on row 8 and that columns I, J, BX, CA, and EK contain the values used by the formula. Adjust the row numbers if your first data row is different.
Use a Nested IF Formula in Column N
Check EK first, then guard against a zero denominator before calculating the existing result.
Open the worksheet and select cell N8.
In the formula bar, enter =IF($EK8=0,$I8,IF($BX8=0,0,$J8/$BX8*$CA8)) and press Enter.
Drag the fill handle from the lower-right corner of N8 down column N to apply the formula to the remaining rows.
Test a row where EK is zero, one where EK is nonzero and BX is zero, and one where both are nonzero. The results should be I, zero, and J/BX*CA, respectively.

Build the Conditional Formula in WPS Spreadsheets
Use WPS Spreadsheets to enter the nested IF formula, check the result, and fill it down for other rows.
- 1. Open the worksheet: Launch WPS Spreadsheets and use Open to select your workbook.
- 2. Select N8: Click cell N8, or select the first result cell if your data starts on another row.
- 3. Enter the formula: Type =IF($EK8=0,$I8,IF($BX8=0,0,$J8/$BX8*$CA8)) in the formula bar and press Enter.
- 4. Apply it to other rows: Drag N8's fill handle down column N, then check a few results against their source values.

Frequently Asked Questions
What happens if both EK and BX are zero?
The formula checks EK first, so it returns the value from I and does not evaluate the division.
Can I return something other than zero when BX is zero?
Yes. Replace the 0 in IF($BX8=0,0,$J8/$BX8*$CA8) with another value, such as "Not available".
Why do the cell references have dollar signs?
In references such as $EK8, the dollar sign locks the column but leaves the row relative. When you fill the formula down, $EK8 changes to $EK9, $EK10, and so on.
Will this formula work in Microsoft Excel?
Yes. Excel supports the same nested IF formula. Enter it in N8 and fill it down as needed.




