+ Reply to Thread
Results 1 to 5 of 5

Vlookup question

  1. #1
    Registered User
    Join Date
    06-01-2011
    Location
    London, UK
    MS-Off Ver
    Excel 2007
    Posts
    8

    Smile Vlookup question

    Hi folks

    I am wondering is it possible to use a variable value for the table_array input on a vlookupargument.

    So for instance the vlookup argument is
    =vlookup(lookup_value, table_array, col_index_num, [range_lookup])

    and I would like to have one of several arrays used depending what is selected in a drop down box.

    Can this be done or could someone suggest a different way of doing it...

    Thanks!

    senan_g
    Last edited by senan_g; 06-13-2011 at 04:13 AM.

  2. #2
    Forum Guru
    Join Date
    03-12-2010
    Location
    Canada
    MS-Off Ver
    2010 and 2013
    Posts
    4,418

    Re: Vlookup question

    Hello and welcome to the Forum,

    Maybe a simple example like the attachment is what you are looking for. If not, please post back with a dummy workbook so we can see what the actual situation looks like.

    Good luck.

    abousetta
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    06-01-2011
    Location
    London, UK
    MS-Off Ver
    Excel 2007
    Posts
    8

    Re: Vlookup question

    Hi abousetta

    I can use the dropdown for the variable "lookup_value" but I am not sure how to use a variable value for the "table_array" input. I have reworked your template a little bit to add a second array, now I would like to return a value that looks at one of two possible arrays.

    Does my question make sense now?

    Thanks for your help

    senan_g
    Attached Files Attached Files

  4. #4
    Forum Guru
    Join Date
    03-12-2010
    Location
    Canada
    MS-Off Ver
    2010 and 2013
    Posts
    4,418

    Re: Vlookup question

    Hi,

    The new formula would be:

    Please Login or Register  to view this content.
    D3 would contain the first dropdown to tell the formula what the value to lookup is and D6 woudl contain the named range (in this case I named them Array1 and Array2).

    Good luck.

    abousetta
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    06-01-2011
    Location
    London, UK
    MS-Off Ver
    Excel 2007
    Posts
    8

    Re: Vlookup question

    Thanks - that really helps. Sorry about the delay in coming back to you!
    Senan_g

+ 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