+ Reply to Thread
Results 1 to 5 of 5

using a variable named range in a vlookup formula

  1. #1
    Registered User
    Join Date
    05-15-2013
    Location
    Salt Lake City, Utah
    MS-Off Ver
    Excel 2010
    Posts
    2

    using a variable named range in a vlookup formula

    Hi-

    I am trying to figure out how to put a variable into a vlookup formula. The formula below works and gives me the correct response ("Rates_101178" is a named range in my workbook):

    =vlookup(b2,Rates_101178,3,false)

    BUT, I'd like for the 101178 portion of the named range in the formula above to be variable, based on the contents of cell c2. There are many named ranges in my workbook that start with "Rates_" but each has a different number at the end.

    I have tried concatenating the formula, and managed to get the correct formula as text, but I need a VALUE for the formula.

    Is there another way to crack this nut?

  2. #2
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: using a variable named range in a vlookup formula

    You can use INDIRECT for that..

    =VLOOKUP(B2,INDIRECT("Rates_"&C2),3,FALSE)

  3. #3
    Registered User
    Join Date
    05-15-2013
    Location
    Salt Lake City, Utah
    MS-Off Ver
    Excel 2010
    Posts
    2

    Re: using a variable named range in a vlookup formula

    That worked like a charm. Thanks. I'll need to learn all about this "indirect" function .

  4. #4
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,829

    Re: using a variable named range in a vlookup formula

    This might be a good place to start http://office.microsoft.com/en-us/ma...778.aspx?CTT=1
    Quote Originally Posted by shg
    Mathematics is the native language of the natural world. Just trying to become literate.

  5. #5
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: using a variable named range in a vlookup formula

    Quote Originally Posted by Daniela1 View Post
    That worked like a charm. Thanks. I'll need to learn all about this "indirect" function .
    Glad to help, thanks for the feedback.

+ 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