Alteration reqd. to SUMPRODUCT

Ian Betteridge

Active Member
Joined
Mar 25, 2006
Messages
472
Evening all,
In the table shown below I need to alter the formula so the SUMPRODUCT only sums QSE or CHO when they appear in column B in the 6th 7th & 8th characters within a particular cell. In the example shown I want cells B2 & B8 to comply but not B5 (1042-LAY-CHO-27D-WT018). This is because the CHO is not the 6th 7th & 8th characters within that cell.
SUMPRODUCT FUNCTION.xls
ABCDE
1Order TypeFunctLocationRoom101
2PM011042-QSE-PCK-L20-PK0051013
3PM011042-QSH-PCK-26D-CV728102
4PM011042-QSH-PCK-15F-EC012H101
5PM011042-LAY-CHO-27D-WT018101
6PM011042-QSH-PCK-15F-EC012H101
7PM011042-WHP-LAY-L01-WH014R102
8PM011042-CHO-SRV-L01-AC040101
Sheet3


Formula in cell E2 is:
=SUMPRODUCT(--($A$2:$A$9996="PM01"),--(ISNUMBER(SEARCH("QSE",$B$2:$B$9996))+ISNUMBER(SEARCH("CHO",$B$2:$B$9996))>0),--($C$2:$C$9996=E$1))

Any help is greatly appreciated.
Ian
 

Excel Facts

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.
Try...

=SUMPRODUCT(--($A$2:$A$9996="PM01"),--ISNUMBER(MATCH(MID($B$2:$B$9996,6,3),{"QSE","CHO"},0)),--($C$2:$C$9996=E$1))

Hope this helps!
 
Upvote 0

Forum statistics

Threads
1,214,790
Messages
6,121,608
Members
449,038
Latest member
apwr

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