Correcting a Vlookup formula that pulls a sheet name based on data in a cell

1. Correcting a Vlookup formula that pulls a sheet name based on data in a cell

I am trying to create this myself, and of course it's not working

=VLOOKUP(A10,INDIRECT(F\$3,"mm-dd-yy"),!\$A\$1:\$AW\$30,13,FALSE)

my sheets in the file are named in the date format mm-dd-yy (example 07-20-14)

F3 will contain a date such as 07/20/14, this date will change based on needs.

Thanks for any help fixing my formula.

Nick

2. Re: Correcting a Vlookup formula that pulls a sheet name based on data in a cell

Try it like this...

=VLOOKUP(A10,INDIRECT("'"&TEXT(F\$3,"mm-dd-yy")&"'!A1:AW30"),13,0)

3. Re: Correcting a Vlookup formula that pulls a sheet name based on data in a cell

You need to convert the date to text. You need to understand this about dates...a date is just a number indicating how many days have passed since 1/1/1900, so today 7/11/14 is actually 41831. excel formats it into something that we recognise as a date

so 07-20-14 is actually just 41840

Try =TEXT(F\$3,"mm-dd-yyyy")

4. Re: Correcting a Vlookup formula that pulls a sheet name based on data in a cell

Thanks Tony that worked perfect.

5. Re: Correcting a Vlookup formula that pulls a sheet name based on data in a cell

You're welcome. Thanks for the feedback!

6. Re: Correcting a Vlookup formula that pulls a sheet name based on data in a cell

Your Welcome, also Tony is it possible to use something like an =IFERROR if a sheet doesn't exist with that name it would show just a blank response or even a 0 in that cell? instead of a #REF error

7. Re: Correcting a Vlookup formula that pulls a sheet name based on data in a cell

Using Tony's formula...
=IFERROR(VLOOKUP(A10,INDIRECT("'"&TEXT(F\$3,"mm-dd-yy")&"'!A1:AW30"),13,0),"")

8. Re: Correcting a Vlookup formula that pulls a sheet name based on data in a cell

thanks FDibbins, that worked perfect.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1