How to count the number of occurrence within string?

E

Eric

Does anyone have any suggestions on how to count the number of occurrence
within string? For example, aa11bb5c in cell A1, and "a" in cell B1, I would
like to count the number of occurrence for the char "a" in cell B1 within
string "aa11bb5c" in cell A1, and return the number of occurrence 2 in cell
c1.
Does anyone have any suggestions?
Thanks in advance for any suggestions
Eric
 
M

muddan madhu

try this

put this formula in C1 =SUM((MID(A1,COLUMN(1:1),1)=B1)*1)

use ctrl + shift + enter
 

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