Return Vlookup Value if a match is found and date is between 2 values

mikeb3408

New Member
Joined
Mar 8, 2010
Messages
13
I have a table similar to below

Event DateIDVlookup Info
2/13/2016A156X
1/15/2013B498

<tbody>
</tbody>

I need to do a Vlookup to another table which has multiple lines of information about the IDs above, and I only want to return the line with info where the ID is matched and the Event Date falls between the Beginning Date and End Date in this other table as shown below:

IDBeginning DateEnd DateInfo
A1562/10/20162/14/2016X
A1561/1/20151/15/2015Y

<tbody>
</tbody>


So for in my example above, I would only want to retrieve the Information for the first line since the ID is matched and the Date falls within the range.

I assume I need a combination of Vlookup and If but not exactly sure how to proceed.
 
Glad to hear that. Thanks much for the update.

Hi Aladin,

Quick question. This had been working for me great and recently on my machine when I run this code, if just returns a blank cell instead of workign as it had been. This is even going for your test excel that you put in drop box.

Do you have any idea why this could be?

Really appreciate any help, sorry it has been a little while since the original post
 
Upvote 0

Excel Facts

What is =ROMAN(40) in Excel?
The Roman numeral for 40 is XL. Bill "MrExcel" Jelen's 40th book was called MrExcel XL.
Hi Aladin,

Quick question. This had been working for me great and recently on my machine when I run this code, if just returns a blank cell instead of workign as it had been. This is even going for your test excel that you put in drop box.

Do you have any idea why this could be?

Really appreciate any help, sorry it has been a little while since the original post

Hard to tell without seeing the file in which it seems to fail. Did you apply control+shift+enter as you should?
 
Upvote 0

Forum statistics

Threads
1,215,417
Messages
6,124,777
Members
449,187
Latest member
hermansoa

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