Count occurance of a leter in a text string

J

justaman

Needing to make a simple billboard sign making sheet.

The operator would enter the sign's current text and in another
cell enter the new text.

The sheet would show the number of each letter used in the current
sign and compare to that needed in the new sign and show those
letters need to complete the new sign.

That way the workers would only have to carry the necessary letters
up the ladder to complete the new billboard.

Thanks for any help you can provide.
 
T

T. Valko

Let's assume A1 contains the text of the current sign and B1 contains the
text of the new sign.

Enter a couple of column headers in say I1 and J1:

I1 = Current
J1 = New

Enter the letters A, B, C, D, .... Z in cells H2:H27

Enter this formula in I2:

=LEN(A$1)-LEN(SUBSTITUTE(UPPER(A$1),$H2,""))

Copy across to J2

If the result in column J is greater than the result in column I you need
the difference. You can put another formula in column K to get the
difference but you can probably figure out how to do that.
 
J

justaman

Let's assume A1 contains the text of the current sign and B1 contains the
text of the new sign.

Enter a couple of column headers in say I1 and J1:

I1 = Current
J1 = New

Enter the letters A, B, C, D, .... Z in cells H2:H27

Enter this formula in I2:

=LEN(A$1)-LEN(SUBSTITUTE(UPPER(A$1),$H2,""))

Copy across to J2

If the result in column J is greater than the result in column I you need
the difference. You can put another formula in column K to get the
difference but you can probably figure out how to do that.
 

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