Multiple vlook up

JOHN007

New Member
Joined
Aug 7, 2014
Messages
38
I need to lookup for nearest max data and nearest min date and return apprioprate code (code on nearest min date and code nearest max date date) based on two parameters
can anyone help me out?

based on Sheet 2 I need to return CODE in Sheet 1
Sheet 1
A
B
C
D
EXAMPLE DATE
EXAMPLE CODE
1
Name
DATE
Code on nearest Min date
Code on nearest Max date
expected code on min date to be returned
expected code max date to be returned
expected code on min date to be returned
expected code max date to be returned
2
Apple
01-01-2018
?
?
02-01-2018
NA
123
NA
3
Apple
03-01-2018
?
?
03-01-2018
03-01-2018
56
56
4
Orange
08-01-2018
?
?
NA
09-01-2018
NA
2365
5
banana
11-01-2018
?
?
10-01-2018
12-01-2018
3241
236

<tbody>
</tbody>



Sheet 2
A
B
c
Name
Date
CODE
1
Apple
02-01-2018
123
2
Apple
03-01-2018
56
3
Orange
07-01-2018
987
4
Orange
09-01-2018
2365
5
Orange
10-01-2018
698
6
Banana
10-01-2018
1478
7
Banana
12-01-2018
3241
8
Banana
13-01-2018
236

<tbody>
</tbody>
 

Excel Facts

Links? Where??
If Excel says you have links but you can't find them, go to Formulas, Name Manager. Look for old links to dead workbooks & delete.

Forum statistics

Threads
1,215,409
Messages
6,124,733
Members
449,185
Latest member
hopkinsr

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