Skip to content
Free Excel Tutorials
  • Home
  • Excel For Beginners
  • Excel Intermediate
  • Advanced Excel For Experts

Data Analysis

  • Subtotal function in Excel
  • Number and Text Filters Examples in Excel
  • Add Outline to Data in Excel
  • How to Use Solver Tool in Excel
  • Reverse List in Excel

References

  • Create hyperlink with VLOOKUP in Excel
  • Offset in Excel
  • How to use Excel MMULT Function
  • Multi-criteria lookup and transpose in Excel
  • Basic INDEX MATCH approximate in Excel

Data Validations

  • Excel Data validation specific characters only
  • How To Create Drop-down List in Excel
  • Excel Data validation unique values only
  • Excel Data validation no punctuation
  • Excel Data validation with conditional list

Sum if cells contain specific text in Excel

by

This tutorial shows how to Sum if cells contain specific text in Excel using the example below;

Formula

=SUMIF(range,"*text*",sum_range)

Explanation

To sum if cells contain specific text, you can use the SUMIF function with a wildcard.

In the example shown, cell G6 contains this formula:

=SUMIF(C5:C11,"*t-shirt*",D5:D11)

This formula sums the amounts in column D when a value in column C contains “t-shirt”. Note that SUMIF is not case-sensitive.

How the formula works

The SUMIF function supports wildcards. An asterisk (*) means “one or more characters”, while a question mark (?) means “any one character”.

These wildcards allow you to create criteria such as “begins with”, “ends with”, “contains 3 characters” and so on.

To match all items that contain “t-shirt”, the criteria is “*t-shirt*”. Note that you must enclose literal text and the wildcard in double quotes (“”).

Alternative with SUMIFS

You can also use the SUMIFS function. SUMIFS can handle multiple criteria, and the order of the arguments is different from SUMIF. The equivalent SUMIFS formula is:

=SUMIFS(D5:D11,C5:C11,"*t-shirt*")

Notice that the sum range always comes first in the SUMIFS function.

Post navigation

Previous Post:

How to use Excel CHOOSE Function

Next Post:

Customize Ribbon In Excel

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Learn Basic Excel

Ribbon
Workbook
Worksheets
Format Cells
Find & Select
Sort & Filter
Templates
Print
Share
Protect
Keyboard Shortcuts

Categories

  • Charts
  • Data Analysis
  • Data Validation
  • Excel Functions
    • Cube Functions
    • Database Functions
    • Date and Time Functions
    • Engineering Functions
    • Financial Functions
    • Information Functions
    • Logical Functions
    • Lookup and Reference Functions
    • Math and Trig Functions
    • Statistical Functions
    • Text Functions
    • Web Functions
  • Excel VBA
  • Excel Video Tutorials
  • Formatting
  • Grouping
  • Others

Logical Functions

  • NOT function: Description, Usage, Syntax, Examples and Explanation
  • How to use Excel TRUE Function
  • IF, AND, OR and NOT Functions Examples in Excel
  • How to use Excel FALSE Function
  • OR function: Description, Usage, Syntax, Examples and Explanation

Date Time

  • HOUR function: Description, Usage, Syntax, Examples and Explanation
  • DATE function: Description, Usage, Syntax, Examples and Explanation
  • How to determine year is a leap year in Excel
  • NOW function: Description, Usage, Syntax, Examples and Explanation
  • Add workdays to date custom weekends in Excel

Grouping

  • Categorize text with keywords in Excel
  • Group arbitrary text values in Excel
  • Group numbers with VLOOKUP in Excel
  • Calculate conditional mode with criteria in Excel
  • Group times into unequal buckets in Excel

General

  • Sum by group in Excel
  • Delete Blank Rows at Once in Excel
  • Subtotal by invoice number in Excel
  • How to calculate percent variance in Excel
  • Share Excel data with Word documents
© 2025 xlsoffice . All Right Reserved. | Teal Smiles | Abbreviations And Their Meaning