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

Working on a sheet you inherited? Run the Auditor on the whole file first — it flags every #REF!, #N/A, broken column pattern, and inconsistent formula in seconds, free, no signup.

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

Related tasks

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

Last reviewed: