Lookup multiple cells in a range and sum the results

JamesBowdidge

New Member
Joined
Nov 8, 2018
Messages
46
Hi,

I have a row of shift patterns in cells in cells d33:k33, expresses like this - "0900 - 1700"

i also have a secondtable that lists the shift pattern in column 1 and the number of hours forthat shift in column 2 (so for "0900 - 1700" you get 8, and for "0900 - 1300" you get 4...

I want to (in a single cell) have a formular
that will look at the shift in each cell from d33:k33 look up the corresponding number of hours from each shift and sum the result..

So if there are only 2 shifts in the range d33:k33 of "0900 - 1700" & "0900 - 1300" the result would be 12 (8 from the first lookup and 4 from the second)

Can this be done witout stacking multiple vlookups or index/match's?

thanks

James
 

Excel Facts

How can you automate Excel?
Press Alt+F11 from Windows Excel to open the Visual Basic for Applications (VBA) editor.
2 quick questions!

1. Are the shifts showing as "0900 - 1700" or 0900 - 1700?
2. How are you selecting 8 and 4 and want excel to ignore the others? Just that the shift beginning time is the same?
 
Upvote 0
I want to (in a single cell) have a formular that will look at the shift in each cell from d33:k33 look up the corresponding number of hours from each shift and sum the result.

Hi, something like this maybe:


Excel 2013/2016
ABCDE
32Second table
330900 - 17008120900 - 17000900 - 1300
340900 - 13004
350900 - 18003
360800 - 21009
Sheet1
Cell Formulas
RangeFormula
C33=SUMPRODUCT(SUMIFS(B33:B3100,A33:A3100,D33:K33))
 
Upvote 0
Hi FormR,

Total genuis... I had already tried a sumproduct an failed.. thankyou very much!

KolGuy, was replying to you when FormR solved it, thanks tho!!
 
Upvote 0

Forum statistics

Threads
1,223,903
Messages
6,175,279
Members
452,630
Latest member
OdubiYouth

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