How to use text value in cell as criteria

October 2016

How to use text value in cell as criteria


In cell D1, I'm using a SUMIF formula like so

=sum if (A:A; criteria; B:B).

In Column A and B is a list of charges different companies made, the name is on A and the value of the charge is in column B. Each company has multiple charges, so their names will repeat as many times in A. So I want to sum the total charge for each company separate. So what I did is write out their names in Column C, and then what I want to do, starting from the first company in C1 is use the formula I wrote above the display the total sum for that company. But I can't figure out how to use a cell with a text value as a criteria. so for example:
=sum if (A:A; text value in C1; B:B)
I know I can write out the name of the company as the criteria, but if I do it the way I want to I can just drag the formula down the D column next to the C column, which would save time.


You can use the cell address instead of typing in the value

=SUMIF(A:A; "=" & C1; B:B)


Solved by rizvisa1

Related :

This document entitled « How to use text value in cell as criteria » from CCM ( is made available under the Creative Commons license. You can copy, modify copies of this page, under the conditions stipulated by the license, as this note appears clearly.