Excel SUMIF can sum calculated data: it works with cells containing formulas as well as cells containing typed values, provided the results match the criteria and the values being added are numeric. If it returns zero or an unexpected total, check whether the calculated results are text, whether the criteria match exactly, and whether the workbook has recalculated.
How SUMIF handles calculated values
SUMIF has three arguments: a range to check, a criterion to apply, and an optional range to add. Excel evaluates the first two together: it checks each cell in the criteria range, then adds the corresponding cell in the sum range when the criterion is met. The cells in either range can contain formulas. SUMIF uses their current results, not the formula text shown in the formula bar.
For example, a calculated amount in column B can be added based on a category in column A. Assume A2:A5 contains North, South, North, and South. Assume B2:B5 contains formula results of 20, 24, 20, and 12, respectively. With those categories in A2:A5 and calculated amounts in B2:B5, use =SUMIF(A2:A5,"North",B2:B5). The result is 40, because the two North rows contribute 20 each.
The same principle applies if the category itself is calculated. If a formula in A2 returns the text North, SUMIF can match that result just as it would match North typed directly into the cell. The key is that the displayed result must be the value you intend to match, and the sum range must contain values Excel can add.
Check that the calculated results are numbers
A cell can look like a number without holding a numeric value. A formula may return text—for example, because it joins a number to a label, imports text from another system, or uses the TEXT function. SUMIF does not add text values as numeric amounts. Formatting a text value as Currency or Number changes its appearance, but does not convert it into a number.
For a quick check, select a calculated amount and look at the formula bar and the Number Format setting on the Home tab. You can also test a sample cell with ISNUMBER. If the test returns FALSE, the result is not numeric, even if it appears to be 20. A formula that returns an empty string, such as one using an empty-text result, is also text rather than a numeric zero.
To correct the source, change the formula or data import so it returns a number. If a cell contains text that consists only of a number, you may be able to convert it using Excel’s Convert to Number warning or Data > Text to Columns. Choose a conversion method carefully: values with decimal or thousands separators can be interpreted differently depending on regional settings. Do not convert labels or identifiers that only happen to contain digits.
Verify the criteria and the range references
SUMIF’s criterion must match the values in the criteria range. Text matching is generally not case-sensitive, but extra spaces, nonprinting characters, punctuation, and slightly different wording can prevent a match. A value that looks like North may contain a trailing space or a nonbreaking space from a copied web page. Compare the actual cell contents, rather than relying only on how they appear on screen.
If the criterion is in a cell, refer to that cell instead of typing the value into the formula. With the category to find in E2, categories in A2:A5, and calculated amounts in B2:B5, use =SUMIF(A2:A5,E2,B2:B5). This makes it easier to test alternative criteria and helps avoid accidental spelling differences. If E2 contains a formula, SUMIF evaluates its result as the criterion.
For partial text matching, SUMIF supports the asterisk wildcard for any number of characters and the question mark wildcard for one character. With the same ranges as above, this sums categories that contain North anywhere in the text: =SUMIF(A2:A5,"*North*",B2:B5). To match a literal asterisk or question mark in the data, precede that character with a tilde in the criterion.
Also confirm that the criteria range and sum range cover corresponding rows. A common mistake is to start one range on row 2 and the other on row 3, or to include a header in one range but not the other. Keep both ranges the same shape and aligned to the same records; this makes the intended pairings clear and avoids surprises.
Make sure your formula is recalculating
When a source value changes but a formula result does not, SUMIF may be calculating from an old result. In Excel for Microsoft 365 on Windows, go to Formulas > Calculation Options and select Automatic. In a workbook set to Manual, formulas update only when recalculation is triggered, so a SUMIF total can remain stale after its inputs change. Changing the setting can affect calculation for other open workbooks too.
You can request a full recalculation with Ctrl+Alt+F9 on Windows. On a Mac, Excel’s recalculation shortcuts differ by keyboard and version; use Formulas > Calculate Now or Formulas > Calculate Sheet where available. These commands recalculate formulas, but they do not fix a formula whose inputs or references are wrong. If only one part of the workbook is affected, inspect its source formulas as well as the calculation setting.
With calculated or imported data, check for errors in the source cells too. A formula error such as #VALUE! or #N/A can interfere with a calculation that depends on that cell. Find the first error in the criteria or sum range and trace its precedents before changing the SUMIF formula.
Use a concrete troubleshooting sequence
Work from the data outward rather than rewriting the formula at random. This order helps isolate whether the issue is a bad match, a nonnumeric result, a range problem, or a calculation delay:
- Click one row that should qualify and confirm its criteria cell has the expected result, with no leading or trailing spaces.
- Check whether the corresponding sum cell is numeric. A number-looking text result will not contribute as expected.
- Confirm the formula points to the intended criteria and sum ranges, with matching row boundaries.
- Test a criterion copied directly from a qualifying cell, or put the criterion in a separate cell and reference it.
- Check Formulas > Calculation Options and recalculate if the displayed source results may be out of date.
- Look for errors in the source formulas and verify that filters or hidden rows have not led you to misread which records are included.
For a small dataset, you can temporarily add a helper column that shows whether each row should qualify, or filter the criteria column to inspect matching records. A filter does not change what SUMIF includes: hidden rows still count. If you intend to sum only visible rows, SUMIF alone is not the right tool for that requirement; use a method designed for filtered data, such as SUBTOTAL in an appropriate layout.
When SUMIFS or another method is a better fit
SUMIF handles one criterion. Use SUMIFS when the total must satisfy multiple conditions, such as a category and a date. Its argument order differs from SUMIF: SUMIFS takes the sum range first, followed by pairs of criteria ranges and criteria. Make sure the ranges still line up by row.
With categories in A2:A5, dates in C2:C5, calculated amounts in B2:B5, and a category to match in E2, the following adds North amounts dated on or after January 1, 2026: =SUMIFS(B2:B5,A2:A5,E2,C2:C5,">="&DATE(2026,1,1)). The result depends on the dates and amounts in the stated ranges; DATE creates a real Excel date for the condition. If dates in column C are text rather than Excel date values, convert them before relying on date comparisons.
If several criteria or transformations make a formula hard to audit, a helper column can be clearer than a single long formula. Have the helper calculate a clean category or numeric amount, then sum that result. This does not make SUMIF more powerful, but it separates data cleanup from the total and makes individual rows easier to inspect.
Common misconceptions about SUMIF
One misconception is that SUMIF cannot read formula cells. It can; formula-generated values are ordinary calculation results for this purpose. The more useful question is what those formulas return. A result of 20 is different from the text string 20, even if cell formatting makes them look alike.
Another misconception is that a worksheet filter limits SUMIF to visible records. It does not: SUMIF evaluates cells in its referenced ranges whether rows are hidden by a filter or manually hidden. Also, changing a cell’s number format does not repair text values, and changing the SUMIF criterion will not fix a stale calculation mode or a misaligned range. Identify the underlying cause before adjusting the formula.
Frequently Asked Questions
Does SUMIF work with cells that contain formulas?
Yes. It checks the current results of formulas in its criteria range and can add numeric results from formulas in its sum range.
Why does SUMIF return zero when the calculated value looks like a number?
The sum cells may contain text rather than numeric values, the criteria may not match, or the ranges may point to the wrong rows. Check the cell value type and references first.
Can SUMIF use a formula result as its criterion?
Yes. You can reference a cell containing a formula as the criterion, or use a formula result in the criteria range. Excel evaluates the result when it calculates the SUMIF.
Does SUMIF include filtered-out rows?
Yes. Filtering hides rows but does not remove them from SUMIF’s calculation. Use a visibility-aware approach if the total should include only displayed records.
Why does my SUMIF total not change after I update the source data?
Check whether calculation is set to Automatic under Formulas > Calculation Options. If it is set to Manual, recalculate the workbook or change the calculation setting, then verify the source formulas.
Bottom line
SUMIF is compatible with calculated data; the calculation result, not whether it came from a formula, determines what Excel can match and add. For a reliable total, use aligned ranges, confirm that criteria match the calculated results, ensure the sum values are numeric, and check that Excel has recalculated. If those checks pass and the total is still wrong, inspect the source formulas and test a single qualifying row to pinpoint the discrepancy.
Related
- Protect Excel Sheets in Teams: What It Does and How
- Python Goal Seek Like Excel? Methods and Examples
- Power BI Compare Two Excel Sheets: A Practical Guide
Try it: the Formula Explainer: paste any formula and see each function and reference in plain English.
More in Errors & fixes
- Goal Seek Cell Must Contain Value Error in ExcelIn Excel, the Goal Seek message “Cell must contain a value” usually means the cell in the By…
- Fix Data Validation in Excel: Lists, Rules, and ErrorsTo fix data validation in Excel, select an affected cell, choose Data > Data Validation, check the Settings…
- XLOOKUP Not Working in Excel 2019? Fixes and OptionsXLOOKUP is not included in Excel 2019, so updating that version or changing the formula will not make…
- TRIM and CLEAN Not Working in Excel? Fix the Hidden SpacesTRIM and CLEAN can seem broken because they do not remove every character that looks like a space.…
- Circular Reference Error in Excel: Find and Fix ItA circular reference error in Excel means a formula depends on its own result, either directly or through…
- Why Is VLOOKUP Not Working in Excel?VLOOKUP usually fails because its lookup range, match setting, or data types do not match the data you…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.