ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Coverting string of text into individual sums? (https://www.excelbanter.com/excel-discussion-misc-queries/80268-coverting-string-text-into-individual-sums.html)

Pookie76

Coverting string of text into individual sums?
 

Is it possible for me to have excel sum all the one letter codes into
individual cells and let me know the count?

Ie. (AAABBCDDDD) A=3, B=2, C=1, D=4
and have those sums placed in an individual cell for each?

Thanks for the help.


--
Pookie76
------------------------------------------------------------------------
Pookie76's Profile: http://www.excelforum.com/member.php...o&userid=12815
View this thread: http://www.excelforum.com/showthread...hreadid=527651


Ron Coderre

Coverting string of text into individual sums?
 

Try this:

For a value in A2
And B1: A
And C1: B

B2: =LEN(A2)-LEN(SUBSTITUTE(UPPER(A2),B$1,""))
C2: =LEN(A2)-LEN(SUBSTITUTE(UPPER(A2),C$1,""))

Those formulas return the counts of "A" and "B" in cell A2,
respectively.

Is that something you can work with?

Ron


--
Ron Coderre
------------------------------------------------------------------------
Ron Coderre's Profile: http://www.excelforum.com/member.php...o&userid=21419
View this thread: http://www.excelforum.com/showthread...hreadid=527651


Don Guillett

Coverting string of text into individual sums?
 
try
=LEN(A1)-LEN(SUBSTITUTE(UPPER(A1),"A",""))
or if b1 contains A
=LEN(A1)-LEN(SUBSTITUTE(UPPER(A1),b1,""))

--
Don Guillett
SalesAid Software

"Pookie76" wrote in
message ...

Is it possible for me to have excel sum all the one letter codes into
individual cells and let me know the count?

Ie. (AAABBCDDDD) A=3, B=2, C=1, D=4
and have those sums placed in an individual cell for each?

Thanks for the help.


--
Pookie76
------------------------------------------------------------------------
Pookie76's Profile:
http://www.excelforum.com/member.php...o&userid=12815
View this thread: http://www.excelforum.com/showthread...hreadid=527651




Domenic

Coverting string of text into individual sums?
 
Assuming that A2 contains the text string, let C2:C5 contain A, B, C,
and D, then enter the following formula in D2 and copy down:

=SUMPRODUCT(--(MID($A$2,ROW(INDEX($A:$A,1):INDEX($A:$A,LEN($A$2) )),1)=C2)
)

Hope this helps!

In article ,
Pookie76
wrote:

Is it possible for me to have excel sum all the one letter codes into
individual cells and let me know the count?

Ie. (AAABBCDDDD) A=3, B=2, C=1, D=4
and have those sums placed in an individual cell for each?

Thanks for the help.


Pookie76

Coverting string of text into individual sums?
 

Thanks again for all the help. It works perfectly.


--
Pookie76
------------------------------------------------------------------------
Pookie76's Profile: http://www.excelforum.com/member.php...o&userid=12815
View this thread: http://www.excelforum.com/showthread...hreadid=527651



All times are GMT +1. The time now is 02:37 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com