Calculation Issues

Fix Excel SUM Returning Zero for Cells with IF Formulas

Chanuka GeekiyanageChanuka Geekiyanage Nov 12, 2026 868 views

Question details

The user needs to make SUM calculate values returned by IF formulas instead of returning zero.

Fix Excel SUM Returning Zero for Cells with IF Formulas
Product
Microsoft Excel-compatible spreadsheet formulas
Device & OS
not provided
Scenario
A worksheet uses IF formulas that appear to return numbers, and a SUM formula is expected to add those results.
Observed behavior
SUM returns zero because the IF formulas produce numeric text, such as "1" or "2", rather than true numeric values. Changing the cell format to Number does not convert formula text results.
Before you start

Select one affected cell and inspect its formula in the formula bar. Check whether the IF formula places numeric results in quotation marks, such as "1" or "2", and confirm the SUM range includes the affected cells.

Solution 1Recommended

Make the IF formula return real numbers

Use this solution when you can edit the source IF formulas; removing quotation marks is the most direct fix.

SUM ignores text values, even when the text contains digits. An IF formula must return numeric constants without quotation marks for SUM to include them.

1
Open the affected formula

In WPS Spreadsheets or Excel, select an affected cell and click the formula bar or press F2 to edit its IF formula.

2
Remove quotation marks from numbers

Change results such as =IF(A1="Yes","1","2") to =IF(A1="Yes",1,2), then press Enter.

3
Check the SUM formula

Select the SUM cell and verify that its range includes the corrected IF-result cells, for example =SUM(B2:B10).

Expected result: The SUM formula should include the IF results after they are returned as numeric values rather than text.

Calculate IF Formula Results Correctly in WPS Spreadsheets

WPS Spreadsheets lets you inspect and edit IF formulas, return true numeric values, convert numeric text with VALUE or multiplication, and calculate the corrected range with SUM.

  1. 1. Open the worksheet: Launch WPS Office, choose Spreadsheets, and open the XLS or XLSX file containing the IF and SUM formulas.
  2. 2. Edit the IF formula: Select an affected cell, click the formula bar, and remove quotation marks from numeric results, changing values such as "1" and "2" to 1 and 2.
  3. 3. Convert text values if needed: If the source formula cannot be changed, enter =VALUE(B2) or =B2*1 in a helper cell and fill it down using the fill handle.
  4. 4. Recalculate the total: Select the total cell, enter or edit =SUM(the_corrected_range) in the formula bar, and press Enter.
Correct IF formulas so SUM includes their resultsUse familiar formula-bar editing and fill-down toolsOpen and save Microsoft Excel XLSX files with compatible spreadsheet formattingWork with a lightweight spreadsheet editor for everyday calculations
microsoft office alternative - wps office

Frequently Asked Questions

Why does SUM return zero when IF cells display numbers?

The IF formulas may be returning text such as "1" or "2". SUM ignores text values, even when they look like numbers. Remove the quotation marks from the IF results or convert the text with VALUE.

Will changing the cell format to Number fix numeric text from an IF formula?

No. Number formatting changes how a value is displayed, but it does not convert text produced by a formula. Edit the formula or use =VALUE(cell) or =cell*1.

How should an IF formula return numbers for SUM to work?

Return numeric constants without quotation marks, such as =IF(A1="Yes",1,2). Quoted results such as =IF(A1="Yes","1","2") are text and are excluded by SUM.

Can I convert several IF results without rewriting every formula?

Yes. Enter =VALUE(B2) or =B2*1 in a helper column, press Enter, and fill the formula down. Then use SUM on the converted helper range.

What should I check if SUM still returns zero after correcting the IF formula?

Check that the SUM range includes the corrected cells, that the formulas have recalculated, and that the results do not contain non-numeric text or errors. Select the total cell and review its range in the formula bar.