+ Reply to Thread
Results 1 to 2 of 2

range names in lookup functions

  1. #1
    Registered User
    Join Date
    05-02-2005
    Posts
    4

    range names in lookup functions

    I am trying to incorporate range names in an Hlookup function so the user can select which lookup table to use.

    My Hlookup function is:
    =hlookup(E14,G14,L13)

    Where G14 is a user enterd value. Possible values are Table1, Table2, or Table3

    The spreadsheet contains range names of

    Table1 (range = ah17:an38)
    Table2 (range = ah43:an64)
    Table3 (range = ah69:an90)

    Excel does not appear to use the text entry in G14 to the identical range name built into the spreadsheet.

    Any help will be appreciated. Thanks


    Duane

  2. #2
    Forum Expert swatsp0p's Avatar
    Join Date
    10-07-2004
    Location
    Kentucky, USA
    MS-Off Ver
    Excel 2010
    Posts
    1,545
    You don't mention what the L13 reference in your formula represents. Is that a cell reference that will contain the row index number?

    HLOOKUP syntax is:

    HLOOKUP(lookup_value,table_array,row_index_num,[range_lookup])

    Assuming all of the above is true, your formula should look like this:

    =HLOOKUP(E14,INDIRECT(G14),L13)

    HTH

    Bruce
    Bruce
    The older I get, the better I used to be.
    USA

+ 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