Summing text, numbers in same cell

rrowe

New Member
Joined
Feb 23, 2004
Messages
21
Can someone help me understand why the Total column does no total correcly? It should sum up to 11 instead of 10. The formula for it is shown below. The formula for the Paired column works ok. The numbers and text may reside in the same cell, and I need to sum them. Thanks!

Paired Total
1p 1p 2p p p p p 7 10


=SUMPRODUCT(--ISNUMBER(FIND("p",B3:H3,1)))+SUMPRODUCT(--ISNUMBER(FIND("pp",B3:H3,1)))+SUMPRODUCT(--ISNUMBER(FIND("ppp",B3:H3,1)))+SUMPRODUCT(--ISNUMBER(FIND("1p",B3:H3,1)))+SUMPRODUCT(--ISNUMBER(FIND("2p",B3:H3,1)))
 

Excel Facts

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.
Try breaking down you formula.

=SUMPRODUCT(--ISNUMBER(FIND("p",B3:J3,1))) finds 7 p

=SUMPRODUCT(--ISNUMBER(FIND("pp",B3:J3,1))) finds 0 pp

=SUMPRODUCT(--ISNUMBER(FIND("ppp",B3:J3,1))) finds 0 ppp

=SUMPRODUCT(--ISNUMBER(FIND("1p",B3:J3,1))) finds 2 1p

=SUMPRODUCT(--ISNUMBER(FIND("2p",B3:J3,1))) finds 1 2p

7+2+1 = 10
 
Upvote 0
What are the possible values in B3:H3 and what does each "score"? If there's a limited number of possibilities you might be better off with a COUNTIF based formula, e.g.

=SUM(COUNTIF(B3:H3,{"p","pp","ppp","1p","2p"})*{1,2,3,2,3})
 
Upvote 0
Thanks Charlie, but I need to add the value of the 2p, which would be a value of 3.
2+p=3 which is the value of the cell. I know that makes it more complicated. Thanks for the assistance.
 
Upvote 0

Forum statistics

Threads
1,224,507
Messages
6,179,183
Members
452,893
Latest member
denay

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top