Sum if cell contains text in other cell in Excel

In this article, we will learn about how to get the SUM value if cell value is equal to a specific value in other cell in Excel.

In simple words, when working with long data sheets, sometimes we need to extract the sum of values corresponding to where cell is equal to the value in other cell like getting the sum of monthly expense where just a specific day’s (weekday) amount is required.

Let’s get the Generic Formula:

=SUMIF (range, cell reference, sum_range)

range : condition on the array
cell reference : value in referred cell.
sum_range : range where sum is needed

Let’s understand this function using it in an example.
Here we have Order IDs from different regions with their respective quantity and Price.

We need to get the sum of Total Price for a specific Product in other cell I4.

Use the formula:

=SUMIF(C2:C21, I4, F2:F21)

C2:C21 : range where formula matches values.
I4 : Value from the other cell to match with C2:C21 range
A2:A26 : sum_range where amount adds up.
=SUMIF({“Carrot”;”Whole Wheat”;”Chocolate Chip”;”Chocolate Chip”;”Arrowroot”;”Carrot”;”Whole Wheat”;”Carrot”;”Carrot”;”Potato Chips”;”Arrowroot”;”Chocolate Chip”;”Whole Wheat”;”Carrot”;”Carrot”;”Potato Chips”;”Arrowroot”;”Oatmeal Raisin”;”Bran”;”Oatmeal Raisin”},

This formula adds up all the values corresponding to all the values in cell I4 i.e. “Oatmeal raisin
Press Enter to get the Sum
The formula returns 443.04 as the sum for the value in other cell.

As you can see this formula returns the sum if cell is equal to a value.

Hope you understood how to get the SUM if cell is equal to value in Excel. Explore more articles on Excel SUMIF function here. Please feel free to state your query or feedback for the above article.

Related Articles:

Sum if cells contain specific text
Sum if cell is not equal to value
Sum if cell is equal to value

Popular Articles:

The VLOOKUP Function in Excel
COUNTIF in Excel 2016
How to Use SUMIF Function in Excel

Leave a Reply

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

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Terms and Conditions of use

The applications/code on this site are distributed as is and without warranties or liability. In no event shall the owner of the copyrights, or the authors of the applications/code be liable for any loss of profit, any problems or any damage resulting from the use or evaluation of the applications/code.

Visit Us On TwitterVisit Us On FacebookVisit Us On Google PlusVisit Us On Youtube