+ Reply to Thread
Results 1 to 7 of 7

Named ranges using a named formula

  1. #1
    Registered User
    Join Date
    03-29-2010
    Location
    Earth
    MS-Off Ver
    Excel 2007
    Posts
    37

    Named ranges using a named formula

    The attached sample worksheet includes a small table that relates to the issue that I am posting about.

    I want to set up the data in each column in a worksheet as a dynamic named range using the OFFSET function.

    For example, the name defined for column A (called rngCode) could refer to:

    Please Login or Register  to view this content.

    One alternative would then be to define a named range for each additional column using the same formula with only some minor cell reference changes/differences.

    For example, the name defined for column B (rngColB) could refer to:

    Please Login or Register  to view this content.

    or, better yet:

    Please Login or Register  to view this content.

    (Note the height of the named range for column B depends on a count of the entries in column A, not column B).

    As another alternative, I thought I could achieve the same thing by placing the cursor at cell A2 and then defining a named formula (called NamedFormula) that refers to:

    Please Login or Register  to view this content.

    Then use this named formula to create a relative named range for each column. For example, move the cursor to cell B2 and then define a named range for column B that refers to:

    Please Login or Register  to view this content.

    Then repeat this process by moving the cursor to cell C2 and then define a named range for column C that also refers to:

    Please Login or Register  to view this content.

    I thought the trick was to make sure that I selected a reference cell before opening the Define Name dialog and setting each new column range.

    Unfortunately this doesn't seem to be the right way to go about it, as when I try to select the various ranges using Go To, I get results different to what I expect.

    I am now unsure if this is possible or if I am simply going about it the wrong way.

    Thanks in advance.
    Attached Files Attached Files

  2. #2
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: Named ranges using a named formula

    Have a look at the attached workbook and this link
    The Imposing INDEX

    Is this what you are trying to do?
    Attached Files Attached Files
    If you need any more information, please feel free to ask.

    However,If this takes care of your needs, please select Thread Tools from menu above and set this topic to SOLVED. It helps everybody! ....

    Also
    اس کی مدد کرتا ہے اگر
    شکریہ کہنے کے لئے سٹار کلک کریں
    If you are satisfied by any members response to your problem please consider using the small Star icon bottom left of their post to show your appreciation.

  3. #3
    Registered User
    Join Date
    03-29-2010
    Location
    Earth
    MS-Off Ver
    Excel 2007
    Posts
    37

    Re: Named ranges using a named formula

    Thanks for your reply Marcol.

    No, my issue isn't a lookup issue. It has to do with whether I am able to define a series of relative named ranges based on a named formula.

    There are 2 or more ranges that are each defined using an OFFSET formula that is almost identical except for the first argument (the reference argument). I thought I may be able to define a named formula (the OFFSET formula) and then simply use this named formula as the reference for the remaining named ranges.

    In the worksheet attached to my initial post:

    - the rngCode name should resolve to A2:A7
    - the rngColB name should resolve to B2:B7
    - the rngColC name should resolve to C2:C7
    - and so on for any other columns added beyond column C.

    I have defined rngCode as an OFFSET formula referring to column A. I then defined NamedFormula as an OFFSET formula whose height involves a reference to rngCode. The named ranges for columns B and C (rngColB and rngColC) are both defined as =NamedFormula.

    It is my understanding that I can define relative named ranges, and am wondering if it is possible to do this by using a named formula as the reference for these relative named ranges.

    I have tried playing around with the reference argument in NamedFormula by using $A$2 and A$2, but I can't seem to get the ranges rngColB and rngColC to resolve properly.

  4. #4
    Registered User
    Join Date
    03-29-2010
    Location
    Earth
    MS-Off Ver
    Excel 2007
    Posts
    37

    Re: Named ranges using a named formula

    Hi Marcol

    I had a closer look at the worksheet you attached, in particular how you defined the 2 named ranges.

    So just confirming again that I don't believe it is the solution to my problem AFAICT.

  5. #5
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: Named ranges using a named formula

    Got to go shortly.
    I'll look again later in case nobody else helps.

  6. #6
    Registered User
    Join Date
    03-29-2010
    Location
    Earth
    MS-Off Ver
    Excel 2007
    Posts
    37

    Re: Named ranges using a named formula

    Bump no response

  7. #7
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: Named ranges using a named formula

    Sorry for the delay, lost your thread.

    I can't see why the workbook I offered doesn't solve your problem, the table is fully dynamic and is not volatile.

    What advantage do you see in naming each individual column?

+ 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