FormulaCraft

How to sum if a cell contains specific text in Excel and Google Sheets

Topic:IF, IFS & nested conditions
Excel & Google Sheets
=SUMIF(A2:A6,"*Pro*",B2:B6)

Verified example

Computed by a real spreadsheet engine on the sample data below.

ProductRevenue
ProMax400
Lite150
ProLite250
Basic100
ProPlus300

=SUMIF(A2:A6,"*Pro*",B2:B6)950

Try it with your data

Edit the grid or formula, then run it through a real spreadsheet engine — no signup.

Sample data — click any cell to edit

Runs server-side · free · no signup

Step by step

  1. 1Identify the text column (e.g. A) and the values column to sum (e.g. B).
  2. 2Enter =SUMIF(A2:A6,"*Pro*",B2:B6). The asterisks are wildcards matching any characters before or after "Pro".
  3. 3Press Enter. Rows where column A contains the substring "Pro" anywhere contribute their B value to the total.

Tips

Need it for your exact data?

Describe your columns in plain English and get the precise formula for your sheet, with the right Excel or Sheets syntax.

Frequently asked

Can I use SUMIF to sum if the cell starts with specific text?

Yes — use a trailing wildcard only: =SUMIF(A2:A6,"Pro*",B2:B6) matches cells that start with "Pro".

What if the text to find contains an asterisk or question mark literally?

Escape literal wildcards with a tilde: "~*" matches a literal asterisk, "~?" matches a literal question mark.

More on IF, IFS & nested conditions

See all →

Formulas used

Written and reviewed by FormulaCraft Team. Each formula on this page is run through our verification engine before publishing.

Last reviewed: