Multiple Criteria Lookup with Date Criteria

keithmcvean

New Member
Joined
Dec 20, 2013
Messages
13
I'm having a bit of an issue trying to figure this one out.

I have a tab with a similar structure to this:

Date Position Name
2015-01-11 Manager Sarah
2015-03-05 Worker Joe
2015-05-11 Manager Dave
2015-05-11 Worker Liz
2016-02-05 Worker Katie
2016-12-01 Manager Steve

The entries are in chronological order. What I'm trying to do is lookup a specific position where the date is less than or equal to today. So if I'm looking up a Manager it should come up Dave or a Worker Liz.

Any ideas? I know how to do multiple criteria lookups but not so much with this date criteria.
 

Excel Facts

Excel Joke
Why can't spreadsheets drive cars? They crash too often!
Would this work? if you put dates in chronological order i think it works, but if they are not in chronological order it may not work...


Book1
ABC
1DatePositionName
22015-01-11ManagerSarah
32015-03-05WorkerJoe
42015-05-11ManagerDave
52015-05-11WorkerLiz
62016-02-05WorkerKatie
72016-12-01ManagerSteve
8
9
10PositionName
11ManagerDave
Sheet1
Cell Formulas
RangeFormula
B11{=INDEX(C2:C7,SMALL(IF(A2:A7<=TODAY(),IF(B2:B7=A11,ROW(A2:A7)-ROW(A2)+1)),ROW(A2:A7)))}
Press CTRL+SHIFT+ENTER to enter array formulas.
 
Upvote 0
Are you interested only in the manager that is closest possible to today, not all managers prior to today? If so:

CONTROL+SHIF+enter, not just enter:

~
Row\Col
A​
B​
C​
D​
E​
F​
1​
DatePositionName
11/26/2015​
11/26/2015​
2​
1/11/2015
ManagerSarahmanagerworker
3​
3/5/2015
WorkerJoeDaveLiz
4​
5/11/2015
ManagerDave
5​
5/11/2015
WorkerLiz
6​
2/5/2016
WorkerKatie
7​
12/1/2016
ManagerSteve

<tbody>
</tbody>


In E2 control+shift+enter, not just enter, and copy across:

=IFERROR(INDEX($C$2:$C$7,1/(1/MAX(IF($A$2:$A$7 < E$1,IF($B$2:$B$7 = E$2,ROW($C$2:$C$7)-ROW($C$2)+1))))),"")<e$1,if($b$2:$b$7=e$2,row($c$2:$c$7)-row($c$2)+1))))),"")<strike></e$1,if($b$2:$b$7=e$2,row($c$2:$c$7)-row($c$2)+1))))),"")<strike>
 
Upvote 0

Forum statistics

Threads
1,215,011
Messages
6,122,680
Members
449,091
Latest member
peppernaut

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