Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel - Count number of time a text value is used 1

Status
Not open for further replies.

CharlieMike73

Programmer
May 17, 2002
120
US
I am trying to figure out how to count the number of times the string "XML","ORA", or "MSS" appears in a single column.

I was told to try 'sumproduct' but I was unable to figure out how to get this to work and reading Excel help told me that this returns a zero for non-numeric results.

So what function do I use to test for and count the number of times a non-numeric value appears?

Any assistance is appreciated.
 



Hi,

How about COUNTIF?

Skip,

[glasses] When a diminutive clarvoyant had disappeared from detention, headlines read...
Small Medium at Large[tongue]
 
Excellent, that looks like that might work - thank you for such a fast reply!
 
You'll either need multiple COUNTIF() functions...

Code:
=COUNTIF(A1:A4,"XML")+COUNTIF(A1:A4,"ORA")+COUNTIF(A1:A4,"MSS")

.. or a single SUMPRODUCT() function...

Code:
=SUMPRODUCT((A1:A4="XML")+(A1:A4="ORA")+(A1:A4="MSS"))

HTH

Regards,
Zack Barresse

Simplicity is the ultimate sophistication. What is a MS MVP? PODA
- Leonardo da Vinci
 
Hi Intelliweb:

Or in line with Zack's proposed solution, you may also use ...
Code:
=SUMPRODUCT(--(A1:A4={"XML","ORA","MSS"}))
Or
Code:
=SUM(COUNTIF(A1:A4,{"XML","ORA","MSS"}))



Yogi Anand, D.Eng, P.E.
Energy Efficient Building Network LLC
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top