Hard V-Lookup in Excel

On Sheet 1 we have Column B that has a column of dates. Column C is tittle "Label"

On Sheet 2 we have a table with three columns Start, End and Label.

On Sheet 1, I need a formula for Column C titled "Label". This would read the table on Sheet 2. It need it to find out which the date is in between. Then give the resulting "Label".

For example: If the date on Sheet 1 is Dec 20th, 2017. It would read from the table on Sheet 2 that it is inbetween the start and end of row 4. This label would be "Mark"
Date-Labels.xlsx
cansevinAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Wayne Taylor (webtubbs)Commented:
For example: If the date on Sheet 1 is Dec 20th, 2017. It would read from the table on Sheet 2 that it is inbetween the start and end of row 4. This label would be "Mark"

20-Dec-17 is between 16-Dec-17 and 15-Jan-18, so the label will be "Susy".

But given the dates are in order and do not overlap, you can use this in cell C2 and copy down...

=VLOOKUP(DATEVALUE(B2), Sheet2!A:C, 3, 1)

Note that the dates in column B are not real date values, hence the use of the DATEVALUE function within the VLOOKUP.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
cansevinAuthor Commented:
Amazingness.... thanks!
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Excel

From novice to tech pro — start learning today.