Vlookup, 2 criteria, closest date?

andrewwhitfield

New Member
Joined
Mar 28, 2011
Messages
31
I have hit a bit of a dead end and would be grateful for any pointers.<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p>
<o:p></o:p>
ID Value Date Value<o:p></o:p>
SW123 1-Jun-2011 0.00<o:p></o:p>
SW124 1-Jun-2011 0.00<o:p></o:p>
SW125 1-Jun-2011 13526597.13<o:p></o:p>
SW126 1-Jun-2011 85637799.37<o:p></o:p>
SW127 1-Jun-2011 32026961.34<o:p></o:p>
<o:p></o:p>
The above is an example of the range I need to look up and there may be several entries for each ID across a date range of a calendar month.<o:p></o:p>
<o:p></o:p>
I am trying to retrieve the value in column C where the said ID matches a specified date, however it may be that the date is not in the list in which case I would need the closest previous date to be found and the value in column C returned.<o:p></o:p>
<o:p></o:p>
I hope that makes some sense... any help would be greatly appreciated.<o:p></o:p>

Andrew
 

Excel Facts

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce
Excel Workbook
ABC
1SW12301-Jun-110
2SW12401-Jun-110
3SW12501-Jun-1113526597.1
4SW12601-Jun-1185637799.4
5SW12701-Jun-1132026961.3
6sw12802-Jun-112000
7
8
9
10SW12803-Jun-112000
Sheet2
 
Upvote 0
Hi, thanks for your reply... looked promising, however I get #N/A error when I try and replicate this. Any ideas? I can't see where the formula references the date in Row 10, perhaps i'm just missing the obvious though.

thanks,
 
Upvote 0

Forum statistics

Threads
1,224,600
Messages
6,179,836
Members
452,947
Latest member
Gerry_F

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