How to Sum If Cells Contain Text in Excel

To sum cells that contain specific text in Excel, you can use the SUMIF function. The SUMIF function allows you to add up numbers based on specific criteria.

Here's how to use the SUMIF function to sum cells containing specific text:

  1. Open Excel and enter your data in the worksheet. Make sure you have a column with text and a column with numbers to be summed.
  2. Click on the cell where you want the sum to be displayed.
  3. Type the following formula:
=SUMIF(range, criteria, sum_range)

For example, let's say you have a table with two columns: Column A contains the product names, and Column B contains their sales. You want to find the total sales for products containing the word "Phone".

Example

A B
Phone A1 100
Phone B2 200
Tablet A1 150
Phone C3 300
Tablet B2 250

To sum the sales for products containing the word "Phone", you can use the following formula:

=SUMIF(A1:A5, "*Phone*", B1:B5)

This will search for the text "Phone" in the range A1:A5 and sum the corresponding sales in the range B1:B5. The result will be 600.

In this example, the formula is entered in cell C1. After entering the formula, press Enter, and Excel will display the result (600) in cell C1.

Did you find this useful?