+ Reply to Thread
Results 1 to 3 of 3

Dynamic naming of range needed

  1. #1
    XXL User
    Guest

    Dynamic naming of range needed


    Hi

    I've got a table A1:Y147 where A1:Y1 are the field headings and D1 =
    "Student ID". What I want to be able to do is to name the range of
    cells from A1:Y*, where * is the last row where student ID data is
    found. This should be dynamic, constantly updating upon closing the
    file, so that the named range increases or decreases according to the
    increasing and decreasing size of the student id column.

    Can anyone help? Thanks.




    --
    XXL User

  2. #2
    Barb Reinhardt
    Guest

    RE: Dynamic naming of range needed

    Try using the offset function. Sorry I don't have time to give you the
    full function you need.

    "XXL User" wrote:

    >
    > Hi
    >
    > I've got a table A1:Y147 where A1:Y1 are the field headings and D1 =
    > "Student ID". What I want to be able to do is to name the range of
    > cells from A1:Y*, where * is the last row where student ID data is
    > found. This should be dynamic, constantly updating upon closing the
    > file, so that the named range increases or decreases according to the
    > increasing and decreasing size of the student id column.
    >
    > Can anyone help? Thanks.
    >
    >
    >
    >
    > --
    > XXL User
    >


  3. #3
    Registered User
    Join Date
    08-03-2006
    Posts
    1
    This method only works if there are no blank rows in your list.

    For simplicity I'll do it with a named value and a named range.

    First create a new name "num_students". Use this formula for it:

    =counta($D$2:$D$1000)

    This returns the number of cells in the range of D2 to D1000 that aren't blank. So it will give you the number of students in your list assuming your data starts on row 2 and there are no blank values anywhere until you get to the bottom of the list. I used D1000 as the ultimate end of the sheet, you could pick something bigger if you have more than 999 students.

    Next create a new name "student_list". Use this forumula:

    =OFFSET($A$2,0,0,num_students,25)

    You now have a dynamic range that is determined by using A2 as the top left value and moving across 25 colums to column Y and down num_students to the last row of student information.

    Hope that makes sense.

+ 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