Reference Lookup need for a Name and Date set

TJ flyer

New Member
Joined
May 1, 2014
Messages
15
I am trying to look at a user log data set and assign a team based on the user name and the date. I have a seperate table with user names and the dates they were on the different teams. VLOOKUP will find the first entry for the user but I can't figure out how to have it also look at the date range. Any Suggestions or ideas?


User Time Log, trying to write a formula that will use the Team Assignment table and fill in the correct value. The expected result is in the last column for reference.

DateNameHoursTeam(Formula)Expected Team
2/1/2016Amy5.0Team 1
3/3/2016Amy4.5Team 1
7/7/2016Amy6.0Team 2
8/2/2016Amy5.0Team 2
2/1/2016Bob4.5Team a
3/2/2016Bob6.0Team b
7/3/2016Bob7.0Team b
2/9/2016Jim6.0Team c
8/5/2016Jim2.0Leader

<tbody>
</tbody>

Team Assignment Table:

NameStart DateEnd DateTeam
Amy1/1/20164/1/2016Team 1
Amy4/2/201612/9/2016Team 2
Bob1/1/20163/1/2016Team a
Bob3/2/2016Team b
Jim1/1/20167/1/2016Team c
Jim7/2/2016Leader

<tbody>
</tbody>
 

Excel Facts

Add Bullets to Range
Select range. Press Ctrl+1. On Number tab, choose Custom. Type Alt+7 then space then @ sign (using 7 on numeric keypad)
With your first range in A1:E10 and your second range in G1:J7 (headers in row 1), try this in D2:

=LOOKUP(2,1/((G$2:G$7=B2)*(H$2:H$7<=A2)*((I$2:I$7>=A2)+(I$2:I$7=""))),J$2:J$7)
 
Upvote 0
Perfect! Works like a charm. Now I wish I hadn't banged my head against that wall all day yesterday. I need to turn to the wise community sooner. :)
 
Upvote 0

Forum statistics

Threads
1,214,601
Messages
6,120,465
Members
448,965
Latest member
grijken

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