+ Reply to Thread
Results 1 to 5 of 5

Relative cell reference in Name Manager

  1. #1
    Registered User
    Join Date
    12-21-2012
    Location
    Hungary
    MS-Off Ver
    Excel 2019
    Posts
    56

    Relative cell reference in Name Manager

    I want to set up a reference (i.e Table 1) for the A2:Ax array
    and I always need to know how many items are in the column and change the reference's range according to that.

    I do a COUNTA(A:A) and I get a number and I want this number to be the end of the range.
    (i.e COUNTA(A:A) is in B2 and the value is 5461. So the reference changes to $A$2:$A$5461)
    How can I change the reference's range in the Name Manager so it always updates itself when the A column changes?

  2. #2
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,607

    Re: Relative cell reference in Name Manager

    here, try this:

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    (;2 is number of columns you want to return. If it's only 1 then remove that part):

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Also change ; to , if you use , in Regional settings

  3. #3
    Registered User
    Join Date
    12-21-2012
    Location
    Hungary
    MS-Off Ver
    Excel 2019
    Posts
    56

    Re: Relative cell reference in Name Manager

    It doesn't work for me (maybe im doing it wrong).
    I uploaded the xls.
    There is the A column A2:A5461, it is often updated so the range can change to other then 5461 but I want to keep it updated automatically.
    So if there is more data added to the A column, I want the reference in the Name Manager to update itself so the formulas which use the List1/2/3 references could use the updated data.
    Book2.xlsx
    Last edited by Petijandro; 02-07-2013 at 07:58 AM.

  4. #4
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Relative cell reference in Name Manager

    =a2:index(a:a,counta(a:a))
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  5. #5
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Relative cell reference in Name Manager

    =A2:INDEX(A:A,COUNTA(A:A)) ps attachment is invalid

+ 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