Search code examples
excelexcel-formulamatchexcel-2010vlookup

VLOOKUP retrieving data under today's month and year


So my problem is that I cannot figure out how to use VLOOKUP to get data under today's month and year.

enter image description here

So as seen in the pic, I have data under every month of multiple years and I need to look up the data under today's month and year and input it into my designated cell.

I tried this formula among many others with the same concept but it didn't work:

=VLOOKUP(sheet2!C9;sheet2!B6:AD16;MATCH(TEXT(TODAY();"MMYYYY");Sheet2!E8:AD8;0);FALSE)

I would appreciate your help!


Solution

  • I think that the HLOOKUP function is probably called for here:

    =HLOOKUP(TEXT(TODAY(), "MMM-YY"), Sheet2!B6:AD16, 2, FALSE)
    

    enter image description here

    I'm also not sure about using semicolons in formulas like you've done. At any rate, HLOOKUP is more appropriate in this situation.