+ Reply to Thread
Results 1 to 3 of 3

Named ranges with HLOOKUP

  1. #1
    Registered User
    Join Date
    10-08-2009
    Location
    Gigondas, France
    MS-Off Ver
    Excel 2008 v12.2.0
    Posts
    2

    Named ranges with HLOOKUP

    I am trying to use a named range for the table in HLOOKUP where the named range appears in another spreadsheet cell. I have tried entering the range in the HLOOKUP formula as the result of the CELL("contents') function but this does not work, any suggestions? The HLOOKUP function does work correctly if I enter manually the named range in the formula. I am wondering if HLOOKUP will only accept a range or range name and not a formula that retums that name from another cell, if this is so does anyone have any suggestions on how to achieve the table lookup a different way when the table range is a variable?

    Thanks

  2. #2
    Forum Expert sweep's Avatar
    Join Date
    04-03-2007
    Location
    Great Sankey, Warrington, UK
    MS-Off Ver
    2003 / 2007 / 2010 / 2016 / 365
    Posts
    3,444

    Re: Named ranges with HLOOKUP

    You could do it like this, where B1 contains the name of the named range..

    =HLOOKUP(lookup_value,INDIRECT(B1),row_index)
    Rule 1: Never merge cells
    Rule 2: See rule 1

    "Tomorrow I'm going to be famous. All I need is a tennis racket and a hat".

  3. #3
    Registered User
    Join Date
    10-08-2009
    Location
    Gigondas, France
    MS-Off Ver
    Excel 2008 v12.2.0
    Posts
    2

    Wink Re: Named ranges with HLOOKUP

    Many thanks Sweep, that works perfectly, I had just not come upon the INDIRECT function before, useful.

    Thanks again!

+ 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