Share via

Vlookup by conditional date

Anonymous
2017-04-10T16:18:13+00:00

Hi community,

I am wanting to use a vlookup formula that is based on greater than or less than a specific date. I have provided a dummy sheet with an ideal correct table.  Thank you!

https://1drv.ms/x/s!AmEnasLDulc3gxyayGu6dkVKOeSA

I am thinking it is something along the lines of....

=IF(Table1[date]<1/1/2011,VLOOKUP(Table3[customer],Table1,3,FALSE),VLOOKUP(Table3[customer],Table1[#All],4,FALSE))

Peace,

J.Elliott

Microsoft 365 and Office | Excel | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

3 answers

Sort by: Most helpful
  1. Ashish Mathur 101.9K Reputation points Volunteer Moderator
    2017-04-10T22:16:23+00:00

    Hi,

    Based on the image posted by Ketul, try this formula in cell G18 and copy down

    =IFERROR(IF(A18<DATE(2011,1,1),VLOOKUP(B18,$B$8:$D$13,2,0),VLOOKUP(B18,$B$8:$D$13,3,0)),"")

    Hope this helps.

    Was this answer helpful?

    0 comments No comments
  2. Anonymous
    2017-04-10T19:43:37+00:00

    Thank you Ketul,

    Unfortunately my excel doc is much more complicated than this and so that is why I need to do it with a Vlookup format.  While this works for the dummy, it is not suitable for my actual excel.

    Was this answer helpful?

    0 comments No comments
  3. Anonymous
    2017-04-10T17:17:14+00:00

    Copy and paste below formula and drag it down

    =IF(A8<DATE(2011,1,1),C8,IF(A8>=DATE(2011,1,1),D8,""))

    Was this answer helpful?

    0 comments No comments