COUNTIF Function

P

PatJennings

Using Excel 2002
I have rows of data with values in cells. I would like to count the number
of times the letter X appears in each column. Using the COUNTIF function in
the following manner reports a value of zero. The formula is in cell B22:
=COUNTIF(B2:B21,"X"). In column B there are ten instances of the letter X.
Can someone help? Thanks!
 
P

PCLIVE

Do those cells contain other letters or characters, including spaces?

If so and you want to count those, then you might try:
=COUNTIF(B2:B21,"*X*")

Regards,
Paul
 
D

Dave

Hi,
Your data may be contaminated with spaces.
To test for this, temporarily modify your formula to:
=COUNTIF(B2:B21,"*X*")
Does that change the count?
Regards - Dave.
 
P

PatJennings

W O W ! ! !
Thanks to all for the immediate response. The adjustment to the formula did
the trick.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top