Count cells except...

  • Thread starter Thread starter jmj713
  • Start date Start date
J

jmj713

I'm trying different tricks with COUNTIF but nothing seems to work. I'm
trying to get Excel to give me a count of cells that contain data, except
those that contain either X or Y.
 
Assuming that your count is text or numeric, you could try:
=COUNTA(A2:A10)-COUNTIF(A2:A10,"x")-COUNTIF(A2:A10,"y")
If it's only numeric, you could change the first function from COUNTA to COUNT
 
Is this related to your other post?
trying to get Excel to give me a count of cells that contain
data, except those that contain either X or Y.

In your other post you made it sound like there were only X or Y in the
range.

Perhaps you should explain in more detail what you want. Tells us where this
data is. Now it sounds like there is other data in the range besides X and
Y. If you want percentages, are there any empty cells in the range and
should they be considered or ignored?
 
It is.

I used John's formula, slightly edited it, and now I solved both problems.
Thank you both.
 
Back
Top