Counting instances in a cell

J

jose

Hello,

How can I count the number of times the number 4 repeats
itself in a single cell? Example: I have 456444 in A1
and I would like to know how many time the number 4
appears in the cell. Any help would be appreciated.

Thanks,

Jose R.
 
J

Jim May

Below assumes that A1 containing 456444 is text.

In B1 enter:
=(LEN(A1)-LEN(SUBSTITUTE(A1,"4","")))

HTH
 
Top