Extract middle partial text then summing a range based on met criteria

Wiryeman

New Member
Joined
Jun 25, 2008
Messages
5
Greetings,

I am trying to sum a range based on a partial middle text criteria in the adjoining range. e.g.

in Column A | Column B

6300104 - Beauty | 100
6300105 - is in | 200
6300106 - the | 50
6700104 - eye of | 100
6700106 - the | 75
6800104 - beholder | 25

So I want to sum cells the have the partial string of >=104 and <=105 so in this example I would get a total sum of 425

Thanks
Jeff
 

Excel Facts

Which Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.
Give this formula a try...

=SUMPRODUCT(C1:C6,--(0+MID(A1:A6,5,3)>=104),--(0+MID(A1:A6,5,3)<=105))
 
Upvote 0
If you have column C , and want to sum all number in C only.

=SUMPRODUCT((RIGHT(A1:A6,3)-0>103)*(RIGHT(A1:A6,3)-0<106)*C1:C6)
 
Upvote 0
Hi, Rick, do you mean you need to use another formula in column C,then use your Sumproduct ?
No, I made a mistake and posted my test case (Column A's text covered Column B and instead of widening Column A so it did not overlap Column B, I simply typed the numbers to be added into Column C instead of Column B). The formula I should have posted was this one...

=SUMPRODUCT(B1:B6,--(0+MID(A1:A6,5,3)>=104),--(0+MID(A1:A6,5,3)<=105))

Sorry for any confusion my original message may have caused.

Note: For clarification, using the first data row as an example, I assume cell A1 contained "6300104 - Beauty" and cell B1 contained 100.
 
Last edited:
Upvote 0

Forum statistics

Threads
1,223,229
Messages
6,170,881
Members
452,364
Latest member
springate

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