Vlookup with Today()

Frequent Contributor

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


That could be



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.

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
The formula is correct and works when copied to Excel. That leaves a question of is the Table set up as you say? Does the array formula
work in isolation?


I renamed the table in attached file, try to copy/paste formula from it, not from the post.

@Sergei Baklan 

Hi Sergei and Peter, many thanks for your assistance. I have found the issue. I seem to not be able to rename the table to Outstandingtbl. I click the table and go to table design and change the name but it doesnt stick. I had to use Table7, the default name and after I did the formula works perfectly.


I do have a follow up though and not certain if I can continue here or not but I assume its ok.

I need to add a condition on a field for [Issued or Pending] which is on the same sheet as the formula. If its status is Issued then return the value but if not then return "Pending". Not sure if returning a text in a number field is a good idea but if I have an issue I can change it.


I have uploaded a new file with the new column Issued or Pending.  


thank you very much. 


Oh and regarding the table name...I had 2 names and I deleted both and started all over with naming the table and the name sticked.


Sorry, I didn't catch. We would like to return status here


or column B is the status and depends on it we return in C value or not? If the former how do we know that's issued or pending?


Hi Sergei, sorry for not being more clear on that. the status does depend on if a value is returned or not. If its pending then no value but if its Issued then return the value.

I hope its clear. let me know.


If I understood the logic correctly you may apply custom number format (Ctrl+1) to returned results as


@Sergei Baklan 

very interesting. I however have not made myself clear. I do not need to combine the fields as show but that is an interesting concept.

I simply need in the 3rd column for Value, an amount if the second column has issued in it and if it is pending then return 0. Please see attached.

thank you. I hope this clarifies, and feel free to let us know if you need further clarifications.

best response confirmed by Tony2021 (Frequent Contributor)


If in opposite direction that's like

=IF(E2="Issued", INDEX(....), 0)

Please check in attached. 

Perfect. Thank you for the assistance. Much appreciated.

@Tony2021 , glad it helped, you are welcome