Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Junior Member
 
Posts: 7
Post 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.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,355
Default 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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default Dynamic naming of range needed


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.


--
MattColeridge
------------------------------------------------------------------------
MattColeridge's Profile: http://www.excelforum.com/member.php...o&userid=37080
View this thread: http://www.excelforum.com/showthread...hreadid=568063

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
WEEKNUM to dynamic range name additude Excel Worksheet Functions 5 July 23rd 06 08:12 PM
Can't chart dynamic named range?? [email protected] Charts and Charting in Excel 4 July 20th 06 08:30 PM
Crate group of date, with Dynamic Range in pivot table not working Tiya Excel Discussion (Misc queries) 3 March 1st 06 02:26 PM
help how to crate group of date with Dynamic Range? Tiya Excel Discussion (Misc queries) 0 February 27th 06 06:49 PM
Add a Dynamic Range with 2 Conditions Q John Excel Worksheet Functions 7 December 23rd 04 02:58 PM


All times are GMT +1. The time now is 07:18 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"