How can i add the number of cells in excel with given text criteria?

I have a few simple spreadsheets in excel and want to sum a few of the columns in which there is text.  E.G. one column is the geographical location.  "XYZ"  I would like a formula to quickly sum the number of cells that have "XYZ" in it.  

I have tried the SUMIF formula but does not seem to be working.  i get a blank cell.
YankeeFan03Asked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
Danny ChildConnect With a Mentor IT ManagerCommented:
to count a range of cells that match TEXT criteria, use =COUNTIF(range,"XYZ")
 - you can of course replace "XYZ" with a cell reference.

SUMIF is better for *numerical* comparisons, ie Sum all cells that are bigger than a certain value.
0
 
YankeeFan03Author Commented:
perfect.  works like a charm.
0
All Courses

From novice to tech pro — start learning today.