VLookup for future sheets and files

I have a file that records monthly sheets. I am trying to organize VLOOKUP for sheets that do not yet exist.

Code example: =VLOOKUP($A$60,'C:/Users/JimW/Desktop//[MonthlySheets.xlsx]January18'!$A$2:$B$50,2,0)

However, the code generates an error. Any way around this?

+4
source share
1 answer

Wrap your function in IFERROR ():

=IFERROR(VLOOKUP($A$60,'C:/Users/JimW/Desktop//[MonthlySheets.xlsx]January18'!$A$2:$B$50,2,0),0)

The last ", 0" is what you want to display if the vlookup error fails - often I put text such as "file closed" - the text should be in quotation marks.

+1
source

Source: https://habr.com/ru/post/1676429/


All Articles