Count number of cells that contain a certain letter - Case Sensitive

  • Thread starter Thread starter elite
  • Start date Start date
E

elite

I have an worksheet that counts the number of cells containing a certai
letter:

E.g.
Code
-------------------
=(COUNTIF($B$4:$AO$25,"a")
-------------------


I would like to make this case sensitive so I can return the number o
lowercase 'a' and the number of uppercase 'A'

Thanks for any hel
 
=COUNTIF($B$4:$AO$25,CHAR(97)) for "a"
=COUNTIF($B$4:$AO$25,CHAR(65)) for "A"

Regards,
Stefi

„elite†ezt írta:
 
I have an worksheet that counts the number of cells containing a certain
letter:

E.g.
Code:
--------------------
=(COUNTIF($B$4:$AO$25,"a"))
--------------------


I would like to make this case sensitive so I can return the number of
lowercase 'a' and the number of uppercase 'A'

Thanks for any help


The FIND worksheet function is case sensitive, and will return a number if the
string in question is found (otherwise it returns a VALUE error).

So:

=SUMPRODUCT(--ISNUMBER(FIND("A",rng)))
=SUMPRODUCT(--ISNUMBER(FIND("a",rng)))

should give you your count. The only caveat is that you cannot refer to an
entire column in your cell reference.


--ron
 
Back
Top