sumif containing certain letters

ml1990ml

New Member
Joined
Jan 14, 2014
Messages
9
hi, is there a way and how to find certain text in A1:C4 and then sum numbers next to it (result in column F)? For example like this:


ths-60dc-60dc-60ths120 ?
dc-60tmppa-60tmppa-120dc180 ?
tmppa-30ths-60igr240 ?
igr-240tmppa210 ?

<tbody>
</tbody>

ps: I use excel 2010
 

Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.
Here is one way based on your sample data:

Excel Workbook
ABCDEF
1ths-60dc-60dc-60ths120
2dc-60tmppa-60tmppa-120dc180
3tmppa-30ths-60igr240
4igr-240tmppa210
Sheet1
 
Upvote 0
I used this array formula in F1 copied down

=SUM(IF(LEFT(A$1:C$4,LEN(E1)+1)=E1&"-",SUBSTITUTE(A$1:C$4,E1&"-","")+0))

confirmed with CTRL+SHIFT+ENTER
 
Upvote 0
If you are using XL2007 or above, then here is another array-entered** formula you can consider...

=SUM(IFERROR(1*SUBSTITUTE(A$1:C$4,E1&"-",0),))

**Confirm using CTRL+SHIFT+ENTER and not just Enter by itself
 
Upvote 0

Forum statistics

Threads
1,214,827
Messages
6,121,809
Members
449,048
Latest member
greyangel23

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