Count # of A's in a Cell

Count # of A's in a Cell

Post by Um9uIENvZG » Wed, 08 Feb 2006 06:30:30


Try something like this:
For text in A1
B1: =SUMPRODUCT(LEN(A1)-LEN(SUBSTITUTE(UPPER(A1),"A","")))

Does that help?

***********
Regards,
Ron

XL2002, WinXP-Pro
 
 
 

Count # of A's in a Cell

Post by SmF2eU » Wed, 08 Feb 2006 06:31:37

Like a charm, I feel so stupid, you made that look so easy, thanks again,
youre the best

 
 
 

Count # of A's in a Cell

Post by SmF2eU » Wed, 08 Feb 2006 06:31:41

How do you do this, tried to figure out, and I can't I need to count the
number of A's in a cell, or any other letter that I define. Thanks.
 
 
 

Count # of A's in a Cell

Post by Um9uIENvZG » Wed, 08 Feb 2006 06:32:14

Adjustment:

The formula I previously posted can be used to count occurrences of text in
a range.
Since you're only testing one cell, use this
B1: =LEN(A1)-LEN(SUBSTITUTE(UPPER(A1),"A",""))


Does that help?

***********
Regards,
Ron

XL2002, WinXP-Pro
 
 
 

Count # of A's in a Cell

Post by SmF2eU » Wed, 08 Feb 2006 06:33:47

May I add, I've been using Countif, but lets say the cell has a Text like so
- ART GOES TO CAMP, it would say theres only one A, theres actually 2.
 
 
 

Count # of A's in a Cell

Post by TWFydGluIF » Wed, 08 Feb 2006 06:35:32

For counting a and A in your sample sentence:
Text in A1.
Cell B1: =LOWER(A1)
Cell C1: =SUBSTITUTE(B1,"a","")
Cell D1: =LEN(A1)-LEN(C1)