+ Reply to Thread
Results 1 to 4 of 4

Dynamic VLOOKUP

  1. #1
    Registered User
    Join Date
    08-13-2012
    Location
    memphis, tn
    MS-Off Ver
    Excel 2007
    Posts
    2

    Dynamic VLOOKUP

    Would like to enter the text "November" in a cell on a summary tab and have a vlookup go to the "November" tab and pull back the appropriate data. Next month I'd like to enter "December" and have it bring back December's data...and so on. But I don't want to have to edit they vlookup (there are many) each month.

    Lookup works fine if I directly reference the tab: =VLOOKUP(a10,November!$A:$J,10,FALSE)

    What I would like to do is replace "November!$A:$J" with cell reference so each month I won't have to remember to change the date in all the lookups. There are numerous rows utilizing the vlookup and I have numerous worksheets doing the same thing, so relying on me to remember to change all the vlookups each month is dicey at best.

    Assuming the name of the month is in Cell A1 on the summary tab, then: =VLOOKUP(a10,A1&"!$A:$J",10,FALSE) would be ideal. However, best I can do is get a "#VALUE!" error.

    Any thoughts?

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,875

    Re: Dynamic VLOOKUP

    I think if you change the formula in your vlookup to include the Indirect function it should work.

    Look here for the syntax

    http://stackoverflow.com/questions/9...-function-work

    Alan
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  3. #3
    Forum Expert Ace_XL's Avatar
    Join Date
    06-04-2012
    Location
    UAE
    MS-Off Ver
    2016
    Posts
    6,074

    Re: Dynamic VLOOKUP

    Try..
    =VLOOKUP(A10,INDIRECT($A$1&"!$A:$J"),10,FALSE)
    Life's a spreadsheet, Excel!
    Say thanks, Click *

  4. #4
    Registered User
    Join Date
    08-13-2012
    Location
    memphis, tn
    MS-Off Ver
    Excel 2007
    Posts
    2

    Re: Dynamic VLOOKUP

    Perfecto!

    That solution worked like a champ.

    Thanks alansidman and ace_xl for your speedy responses.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Bookmarks

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