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.
DatePart
1/8/182287
2/8/182269
3/8/18
2234

<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>
</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

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off
=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.

AB
DatePartDate Part
1/8/18284231/7/182842
1/8/18228731/7/182287
1/8/18232031/7/182320
1/8/18284231/7/182842
1/8/18235531/7/182355

<colgroup><col span="5"></colgroup><tbody>
</tbody>

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,214,911
Messages
6,122,196
Members
449,072
Latest member
DW Draft

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