Excel SUMIF Exclude Text: Formula & Examples

Formulas & functions · Updated November 22, 2026

To exclude text in a SUMIF, use the criteria "<>*" (not equal to any text) or combine SUMIF with a wildcard. For example, =SUMIF(A2:A10,"<>*",B2:B10) sums values in B2:B10 only when the corresponding cell in A2:A10 is not text (i.e., it is a number or blank). This works because the asterisk (*) wildcard matches any sequence of characters, and the <> operator means “not equal to.”

Understanding SUMIF and Its Criteria

SUMIF is a core Excel function that adds numbers in a range based on a condition. Its syntax is =SUMIF(range, criteria, [sum_range]). The range is the cells you check against the criteria, and sum_range is the cells you actually sum. If you omit sum_range, Excel sums the range itself. The criteria can be a number, expression, cell reference, or text—and it supports wildcards like * (any sequence) and ? (any single character).

When your data contains a mix of numbers and text labels, you often need to sum only the numeric entries. For instance, a column might have “Paid” or “Pending” alongside dollar amounts. Using "<>*" as the criteria tells Excel to ignore any cell that contains text, because * matches any text string, and <> negates that match.

How to Exclude Text with SUMIF

The most direct method is to use the wildcard criteria. Here’s a step-by-step example:

  • Assume your data has categories in A2:A10 and amounts in B2:B10.
  • In a blank cell, enter: =SUMIF(A2:A10,"<>*",B2:B10)
  • Press Enter. The result sums all B values where the corresponding A cell is not text (i.e., it’s a number or empty).

If your range contains only numbers and text (no blanks), this works perfectly. If blanks are present, they are treated as not text, so they will be included. To exclude blanks as well, use =SUMIF(A2:A10,">0",B2:B10) if all numbers are positive, or =SUMIF(A2:A10,"<>",B2:B10) to exclude truly empty cells (but this still includes text). For a robust solution that sums only numeric cells, consider using =SUM(IF(ISNUMBER(A2:A10),B2:B10)) as an array formula (press Ctrl+Shift+Enter in older Excel, or just Enter in Excel 365).

Using SUMIFS for Multiple Conditions

If you have more than one condition, use SUMIFS. To exclude text in one column while applying another condition, you can combine criteria. For example, with dates in A2:A10, amounts in B2:B10, and status in C2:C10, to sum amounts where the status is “Paid” and the date is not text (which is redundant since dates are numbers), you’d write: =SUMIFS(B2:B10, A2:A10, "<>*", C2:C10, "Paid"). The wildcard works in SUMIFS criteria just as in SUMIF.

Common Pitfalls and Edge Cases

One common mistake is using "<>" alone, which excludes empty cells but still sums text cells (since text is not empty). Another pitfall is forgetting that SUMIF is case-insensitive and treats numbers formatted as text differently. If a cell contains a number stored as text (e.g., “123”), it is considered text, so "<>*" will exclude it. To include such numbers, you might need to convert them to actual numbers using the VALUE function or by using =SUM(IF(ISNUMBER(A2:A10)*ISNUMBER(B2:B10),B2:B10)).

Also note that the wildcard * only matches text, not numbers. So "<>*" works as intended. However, if your range contains errors (like #N/A), SUMIF will ignore them, which is usually fine.

Alternatives: SUMPRODUCT and FILTER

For more complex logic, SUMPRODUCT is a powerful alternative. For example, =SUMPRODUCT((ISNUMBER(A2:A10))*B2:B10) sums B where A is a number. This avoids wildcards and works even if A contains errors. In Excel 365, you can use the FILTER function: =SUM(FILTER(B2:B10, ISNUMBER(A2:A10))). This is more readable and dynamic, but requires Microsoft 365.

Each method has its place: SUMIF is simple and fast, SUMPRODUCT is flexible, and FILTER is modern and clear.

Frequently Asked Questions

Q: Does SUMIF ignore text automatically? No, SUMIF does not ignore text by default. You must specify criteria to exclude text, such as "<>*".

Q: Can I exclude specific text like “N/A”? Yes, use =SUMIF(A2:A10,"<>N/A",B2:B10) to exclude cells equal to “N/A”. For partial matches, use "<>*N/A*".

Q: What if my numbers are stored as text? SUMIF will treat them as text, so "<>*" will exclude them. To include them, convert them to numbers using the VALUE function in a helper column, or use SUMPRODUCT with ISNUMBER after coercion.

Q: How do I sum only numbers in a column that also has text? Use =SUMIF(A2:A10,"<>*",A2:A10) if you want to sum the same range, or adjust the sum range accordingly.

Q: Does this work in Google Sheets? Yes, the same wildcard criteria works in Google Sheets. The FILTER alternative also exists there, but SUMPRODUCT syntax is identical.

Conclusion

Excluding text in SUMIF is straightforward once you understand wildcards. The "<>*" criteria is the standard solution, but for more control, consider SUMPRODUCT or FILTER. Always test with your actual data to ensure the criteria match your intended logic.

Related

Try it: the Formula Explainer: paste any formula and see each function and reference in plain English.

More in Formulas & functions

Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources

Spotted an error in this guide? Let us know.