Multiple lookup values

jmartin

New Member
Joined
Feb 24, 2009
Messages
3
Hey, guys. I'm new here but I've been lurking for a while. I'm having a problem I hope you can help with.

Below is the image of the setup of my sheet. I'm accepting input from the user is cells H2,H3, and H4. I'm looking for an in-cell formula (for H6) that will pull the numbers from the appropriate column based on the employee name (H4) and the date range (H2:H3).

I promise you I've done the best that I could. Here's where I've been:

=SUM(VLOOKUP(A30,A1:E26,COLUMN(INDEX(1:1,MATCH(A31,1:1,0)))))

With this I couldn't figure out how to do multiple lookup_values for VLOOKUP.

=SUM(IF(($A$2:$A$26>=$G$13)*($A$2:$A$26<=$G$14),C2:C26,0))


With this I couldn't figure out how to get it to look in the right column based on the employee name.

I've tried a few other things but these are my least embarrassing :) I'm not sure what else to try. Anyone have any suggestions? The only thing to keep in mind is that column A will not necessarily always be in chronological order.

gandgaabm.jpg
 

Excel Facts

How can you automate Excel?
Press Alt+F11 from Windows Excel to open the Visual Basic for Applications (VBA) editor.
If I got you right ...according to your data use:
Code:
=SUMPRODUCT(($A$2:$A$26>=$H$1)*($A$2:$A$26<=$H$2)*(INDEX($A$2:$D$26,,MATCH(H4,A1:D1,0))))

ـــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــ
Salah
 
Upvote 0

Forum statistics

Threads
1,215,255
Messages
6,123,896
Members
449,132
Latest member
Rosie14

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