Counting the number of times a character appears in a cell

G

Gary Thomson

hi,

How do I count the number of times a specific character
appears in a cell (assuming it is there is the first
place)?

I.e. In cell A1 I have

aaabbccccccc

and if I have "a", "b" and "c" in cells B1, B2 and B3, I
want to show 3, 2 and 7 in cells C1, C2 and C3
respectively.

What function do I use to do this? The function I need to
use also needs to be nested within another function, so I
cant use VBA code.

Many Thanks

Gary.
 
R

RagDyeR

Enter this in C1, and copy down to C3:

=LEN($A$1)-LEN(SUBSTITUTE($A$1,B1,""))
--

HTH,

RD
==============================================
Please keep all correspondence within the Group, so all may benefit!
==============================================


hi,

How do I count the number of times a specific character
appears in a cell (assuming it is there is the first
place)?

I.e. In cell A1 I have

aaabbccccccc

and if I have "a", "b" and "c" in cells B1, B2 and B3, I
want to show 3, 2 and 7 in cells C1, C2 and C3
respectively.

What function do I use to do this? The function I need to
use also needs to be nested within another function, so I
cant use VBA code.

Many Thanks

Gary.
 

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