vlookup date or date

jtodd

Board Regular
Joined
Aug 4, 2014
Messages
194
HI

What I am trying to do is a lookup using 3 dates.

<colgroup><col style="mso-width-source:userset;mso-width-alt:2596;width:53pt" width="71"> <col style="mso-width-source:userset;mso-width-alt:2925;width:60pt" width="80"> </colgroup><tbody>
[TD="class: xl67, width: 71"]Date[/TD]
[TD="class: xl67, width: 80"]Part[/TD]

[TD="class: xl68"]1/8/18[/TD]
[TD="class: xl69"]2287[/TD]

[TD="class: xl68"]2/8/18[/TD]
[TD="class: xl69"]2269[/TD]

[TD="class: xl68"]3/8/18
[/TD]
[TD="class: xl69"]2234
[/TD]

</tbody>
Vlookup 2269 if it occurs on date 1 date 2 or date 3 ,
some thing like vlookup(2269,date1,2) or vlookup(2269,date2,2) or vlookup(2269,date3,2)

Hope this makes sense
 

Excel Facts

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.
=INDEX(A$2:A$4,MATCH(C1,B$2:B$4,0),1)

where C1 is your part number.

This assumes part numbers will be unique in column B which is what your data implies
 
Last edited:
Upvote 0
Hi , sorry I did not explain myselft very well,
What I need is the lookup to look at the date and look at another table and lookup the date or the date before or the date after.

[TABLE="width: 320"]
<colgroup><col span="5"></colgroup><tbody>[TR]
[TD="colspan: 2"]A[/TD]
[TD][/TD]
[TD="colspan: 2"]B[/TD]
[/TR]
[TR]
[TD]Date[/TD]
[TD]Part[/TD]
[TD][/TD]
[TD]Date [/TD]
[TD]Part [/TD]
[/TR]
[TR]
[TD]1/8/18[/TD]
[TD]2842[/TD]
[TD][/TD]
[TD]31/7/18[/TD]
[TD]2842[/TD]
[/TR]
[TR]
[TD]1/8/18[/TD]
[TD]2287[/TD]
[TD][/TD]
[TD]31/7/18[/TD]
[TD]2287[/TD]
[/TR]
[TR]
[TD]1/8/18[/TD]
[TD]2320[/TD]
[TD][/TD]
[TD]31/7/18[/TD]
[TD]2320[/TD]
[/TR]
[TR]
[TD]1/8/18[/TD]
[TD]2842[/TD]
[TD][/TD]
[TD]31/7/18[/TD]
[TD]2842[/TD]
[/TR]
[TR]
[TD]1/8/18[/TD]
[TD]2355[/TD]
[TD][/TD]
[TD]31/7/18[/TD]
[TD]2355[/TD]
[/TR]
</tbody>[/TABLE]

IE lookup 2320 in table A and find it in table B even though the date is the date before (might be the date after but only one)
 
Upvote 0
My answer still stands, use INDEX(...MATCH()) on both tables, that will give you the dates from both tables.
Though you havent said what you want to do with them so that part's down to you.
 
Upvote 0
+1, you are using reverse vlookup, index will return the date from TableB. Date in TableA is irrelevant.

=(INDEX($C$2:$C$6,MATCH(B2,$D$2:$D$6,0),1))

return date from col 3 - C, for each entry in col 2
I am assuming this will go to col 5 - E

Perhaps best would be to have these two tables separated
A-date
B-part
C-result from tableB
 
Upvote 0

Forum statistics

Threads
1,223,888
Messages
6,175,219
Members
452,620
Latest member
dsubash

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