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

Data Analysis

  • How To Filter Data in Excel
  • Calculate Conditional Percentile ‘IF’ in table in Excel
  • How To Sort One Column or Multiple Columns in Excel
  • How to Create Column Chart in Excel
  • What-If Analysis: Scenarios and Goal Seek in Excel

References

  • Two-way lookup with VLOOKUP in Excel
  • CHOOSE function: Description, Usage, Syntax, Examples and Explanation
  • How to get last row in numeric data in Excel
  • How to use Excel FORMULATEXT function
  • Create hyperlink with VLOOKUP in Excel

Data Validations

  • Excel Data validation allow weekday only
  • Excel Data validation unique values only
  • Excel Data validation exists in list
  • Data validation must not exist in list
  • Excel Data validation allow uppercase only

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

  • Extract multiple matches into separate rows in Excel
  • IF with wildcards in Excel
  • How to use IFS function in Excel
  • Nested IF function example in Excel
  • OR function: Description, Usage, Syntax, Examples and Explanation

Date Time

  • How to get workdays between dates in Excel
  • Convert Excel time to decimal seconds
  • DAY function: Description, Usage, Syntax, Examples and Explanation
  • TIMEVALUE function: Description, Usage, Syntax, Examples and Explanation
  • Generate series of dates by weekends in Excel

Grouping

  • Group numbers at uneven intervals in Excel
  • How to randomly assign people to groups in Excel
  • Categorize text with keywords in Excel
  • Map text to numbers in Excel
  • Group numbers with VLOOKUP in Excel

General

  • Find, Select, Replace and Go To Special in Excel
  • Excel Autofill Cell Ranges, Copy, Paste
  • How to calculate profit margin percentage in Excel
  • How to calculate percent of students absent in Excel
  • How to calculate total from percentage in Excel
© 2026 xlsoffice . All Right Reserved. | Teal Smiles | Abbreviations And Their Meaning