Add Values in Excel in Columns that Contain Text

August 2017

This tip will explain how to use the IF function on Microsoft Excel to add values in a column that also contain text.

Sum Values in Columns that Contain Text

For this example, let's assume you'd like to add up the number of rows that contain the word ball:
[Column A]  
Red Ball
Blue Ball
Chair
Pencil
Blue Ball

[Column B]  
2
3
4
1
2


By applying the comparative IF function, you will specify that if column A contains the specified word, the numbers in column B should be added together:
=SUMIF(A:A,"*Ball",B:B)

The resulting output of this formula should be 7.

Related


Published by deri58. Latest update on March 10, 2016 at 03:56 AM by ChristinaCCM.
This document, titled "Add Values in Excel in Columns that Contain Text," is available under the Creative Commons license. Any copy, reuse, or modification of the content should be sufficiently credited to CCM (ccm.net).