Forum Discussion

dasoidas's avatar
dasoidas
Copper Contributor
Mar 23, 2022
Solved

Using VLookup, Indirect, and text formulas

Hi,  I am having trouble with a formula meant to looks through sheets names by a date for a specific value.  I've checked each part of the formula and it each piece appears to operate properly, b...
  • Starrysky1988's avatar
    Mar 23, 2022

    dasoidas 

    You said 012021'!A2 contains the text 72. But you only get the result if you write the formula =VLOOKUP(72,'012021'!A2:G65404,1,FALSE).
    That means 012021'!A2 value is not text format and it is the number format of 72. So your lookup value must be number format as below.
    =VLOOKUP($C3,INDIRECT(TEXT($B3,"MMYYYY")&"!A2:G65404"),1,0)
    (or)
    =VLOOKUP(value($C3),INDIRECT(TEXT($B3,"MMYYYY")&"!A2:G65404"),1,0)

    If not you need to ensure that the first column of table array must be in text format and your formula will surely work. But please note that if your are referring to the own sheet that you are writing the formula, your formula won't work as the circular reference may occur in the current sheet. Let's say your formula is in Column A to G (A2:G65404).

Resources