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?
 
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
 
cansevinAuthor Commented:
Amazingness.... thanks!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.