Smart Systems for Home

Plain how-to guides for smart home, security and home Wi-Fi

Excel SUMIFS Contains Text: Partial Match Guide

· 6 min read · Home Tech

In this article
  1. What You'll Need
  2. Step-by-Step
  3. Common Mistakes
  4. Tips
  5. Troubleshooting
  6. Frequently Asked Questions

SUMIFS can total values where a cell contains a piece of text, but you cannot simply put the text in the criteria argument — you have to combine wildcard characters with the value. The working pattern is =SUMIFS(sum_range, criteria_range, "*text*"), where the asterisks stand for any characters before and after the text. For example, =SUMIFS(B2:B100, A2:A100, "*north*") adds every amount in column B whose column A entry contains the word north anywhere in it — "North Region", "Northgate", "up north" all count. Wildcards are on by default in normal Excel formulas; the one big exception is Excel for the web, where the setting that enables them has to be switched on first, and some older workbook settings can turn them off too.

What You'll Need

  • A version of Excel that supports SUMIFS (Excel 2007 or later on Windows, Excel 2011 or later on Mac, or Excel for the web).
  • A table with at least one column of text to search and one column of numbers to add.
  • Headers on your data, so you can use whole structured references or a generous range like A2:A1000 without grabbing the header row.
  • Wildcards enabled: normally already on in the desktop app; in Excel for the web, check the calculation settings and make sure wildcard support is turned on.

Step-by-Step

  1. Identify your ranges. Decide which column holds the text you want to search (the criteria range) and which column holds the numbers to total (the sum range). Both ranges must be the same size and shape — if the sum range is B2:B100, the criteria range must also cover 99 rows.
  2. Write the basic formula. Click an empty cell and type =SUMIFS(. Excel will prompt you through the arguments in order: sum_range first, then criteria_range1, then criteria1.
  3. Select the sum range. Highlight the numbers you want to add. Press F4 to make the references absolute (for example $B$2:$B$100) if you plan to copy the formula down.
  4. Select the criteria range and enter the wildcard text. Type the range, a comma, then your search text wrapped in asterisks and double quotes: "*north*". The full formula reads =SUMIFS($B$2:$B$100, $A$2:$A$100, "*north*").
  5. Close the bracket and press Enter. Check the result against a manual total for two or three matching rows before you trust it across a big table.
  6. Add a second condition if needed. SUMIFS accepts up to 127 criteria pairs. To total north-region sales only for a specific product, add another range and criteria pair: =SUMIFS($B$2:$B$100, $A$2:$A$100, "*north*", $C$2:$C$100, "Widget"). AND logic applies — every condition must be true.
  7. Point the wildcard at a cell instead of hard-coding it. Put the search word in, say, E1 and write =SUMIFS($B$2:$B$100, $A$2:$A$100, "*"&E1&"*"). The ampersands glue the asterisks onto whatever is in E1, so changing E1 updates the total.
  8. Make the match case-insensitive or exact as required. SUMIFS ignores case by default — "north" and "NORTH" both match. If you need case-sensitive partial matching, SUMIFS cannot do it; use a SUMPRODUCT formula with FIND or SEARCH instead, for example =SUMPRODUCT(ISNUMBER(FIND("north", $A$2:$A$100)) * $B$2:$B$100).
  9. Use a question mark for single characters. A ? matches exactly one character, so "Sm?th" finds Smith and Smyth but not Smooth. Combine * and ? freely.
  10. Test the edge cases. Confirm the formula ignores blank cells, does not double-count, and still works after you insert rows in the middle of the range.

Common Mistakes

  • Forgetting the asterisks. "north" without wildcards only matches a cell whose entire contents are exactly north. That is an exact match, not a contains match.
  • Missing quote marks. The criteria must be text in double quotes. *north* without quotes returns an error or a wrong result.
  • Unequal range sizes. If the sum range is 99 rows and the criteria range is 100, Excel either errors or returns nonsense. Keep them identical.
  • Mixed data types in the sum range. Text that looks like a number (imported with a leading apostrophe, or padded with spaces) is ignored by SUMIFS, so the total comes out low. Convert to real numbers first.
  • Wildcards switched off. In Excel for the web and in some workbooks, the wildcard setting is disabled; then * is treated as a literal character and you get zero. Turn it back on in the calculation options.
  • Matching the asterisk itself. If your data genuinely contains * or ?, escape it with a tilde: "~*" finds a literal asterisk.
  • Trailing spaces. "North" with a trailing space still matches *north*, but a cell containing "North " and a criteria of "North" with no wildcards will not. Wildcards hide this, exact matches expose it.

Tips

  • Use a table (Insert > Table) and structured references so ranges grow automatically: =SUMIFS(Sales[Amount], Sales[Region], "*north*").
  • Wildcards only work on text. They do not apply to numbers or dates in the criteria range — for those, use comparison operators like ">=100" or ">="&DATE(2026,1,1).
  • Keep a small test table beside your formula with one known match and one near-miss so you can spot a broken wildcard instantly.
  • If you need OR logic across different search words, sum two SUMIFS: =SUMIFS(..."*north*") + SUMIFS(..."*south*"). Be careful not to double-count rows that contain both.
  • Use "*"&E1&"*" rather than the deprecated CONTAINS-style tricks so the formula stays readable and portable.

Troubleshooting

The result is zero when you know there are matches. Check three things in order: the criteria has asterisks on both sides, the quotes are present, and wildcards are enabled. If all three are fine, check for hidden spaces by testing ="*"&TRIM(E1)&"*".

The result is too high. A short search word such as "north" also matches "northeast" and "Northampton". Tighten the pattern to "north *" or add a second criteria pair that excludes unwanted rows.

You get #VALUE!. Usually a range size mismatch or a stray character. Rebuild the formula from scratch with the Function Arguments dialog (click the fx button next to the formula bar) so Excel validates each argument.

#NAME? error. SUMIFS is misspelled, or you are in a file saved in an old format that does not support it. Save as .xlsx.

The formula worked, then broke after a filter or sort. Filters do not affect SUMIFS — it sums hidden rows too. If you want visible rows only, use SUBTOTAL with a helper column or the AGGREGATE function instead.

Still not right? Select a piece of the formula and press F9 to evaluate just that part; you will see exactly what Excel is comparing. Press Esc to leave the formula unchanged.

Frequently Asked Questions

Does SUMIFS support wildcards for "contains"?

Yes, on the desktop versions of Excel. Use * for any number of characters and ? for exactly one. The support is on by default but can be switched off in some settings, including Excel for the web.

Is SUMIFS case-sensitive?

No. "North" and "NORTH" match the same rows. For case-sensitive partial matches, use SUMPRODUCT with FIND instead.

Can I combine "contains" with a date or number condition?

Yes, add extra range and criteria pairs. Text criteria use wildcards, while numbers and dates use operators such as ">=100" or ">="&A1.

Why does *text* return nothing?

The usual causes are wildcards being disabled, missing quotation marks, a criteria range of a different size to the sum range, or the search term containing a literal asterisk or question mark that must be escaped with a tilde.

Can SUMIFS match a partial word at the start only?

Yes. Use "north*" to match cells beginning with north, and "*north" to match cells ending with it. Asterisks on both sides match anywhere in the cell.

Does this work in Google Sheets?

No — Google Sheets uses its own SUMIFS, which does not read wildcards the same way. Use SEARCH inside SUMPRODUCT or a REGEXMATCH-based SUMIF pattern there.