Forum Discussion

Tony2021's avatar
Tony2021
Iron Contributor
May 03, 2021
Solved

Vlookup with Today()

Hello Experts,

 

I need a lookup that will return a value based on todays date.  

The tricky part is that my table is in month and year format and not days.  

Also, I think having the dates in row 1 could create an issue but not sure about that. 

 

Please see attached and let me know if you have any questions.

 

Grateful for the help. 

 

14 Replies

  • Tony2021 

    I might set the defined name 'today' to refer to

    =(TEXT(EOMONTH(TODAY(),-1)+1, "m/d/yyyy"))

    then perform an exact match on the table

    = XLOOKUP( today, Table1[#Headers], Table1)

    or the equivalent in old Excel.

    • Tony2021's avatar
      Tony2021
      Iron Contributor
      Hi Sergei, thanks for the great response. I have a question though.
      When I put that formula in my excel it returns a message of "Theres a problem with this formula..."
      do you know why? I dont get the error in your file but I copy and paste and change the name of the table only to my table name.

      Here is what I have: (note only change is Table1 ==> OutstandingTbl
      =INDEX(OutstandingTbl,
      MATCH(A2,OutstandingTbl[Beneficiary],0),
      MATCH(TEXT(EOMONTH(TODAY(),-1)+1,"m/d/yyyy"),OutstandingTbl[#Headers],0))

Resources