Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
dan dan is offline
external usenet poster
 
Posts: 113
Default Selecting a variable range

I have a range that starts in cell A6. Columns extend out
to AH6. My rows vary depending on volume input. How do I
select this variable range? Headers are contained in rows
1 to 5. Thanks.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Selecting a variable range


use something akin to this

from

http://www.contextures.com/xlNames01.html#Dynamic

create a name (insert name define

and then

In the Refers To box, enter an Offset formula that defines the rang
size, based on the number of items in the column, e.g.:
=OFFSET(Sheet1!$A$1,0,0,COUNTA(Sheet1!$A:$A),1)
In this example, the list is on Sheet1, starting in cell A1
The arguments used in this Offset function a
Reference cell: Sheet1!$A$1
Rows to offset: 0
Columns to offset: 0
Number of Rows: COUNTA(Sheet1!$A:$A)
Number of Columns: 1
Note: for a dynamic number of columns, replace the 1 with:
COUNTA(Sheet1!$1:$1)


this would create a range name for a1 to the last value in column

--
duan

-----------------------------------------------------------------------
duane's Profile: http://www.excelforum.com/member.php...fo&userid=1162
View this thread: http://www.excelforum.com/showthread.php?threadid=27442

  #3   Report Post  
Posted to microsoft.public.excel.programming
dan dan is offline
external usenet poster
 
Posts: 113
Default Selecting a variable range

thanks Duane, worked great.
-----Original Message-----

use something akin to this

from

http://www.contextures.com/xlNames01.html#Dynamic

create a name (insert name define

and then

In the Refers To box, enter an Offset formula that

defines the range
size, based on the number of items in the column, e.g.:
=OFFSET(Sheet1!$A$1,0,0,COUNTA(Sheet1!$A:$A),1)
In this example, the list is on Sheet1, starting in cell

A1
The arguments used in this Offset function a
Reference cell: Sheet1!$A$1
Rows to offset: 0
Columns to offset: 0
Number of Rows: COUNTA(Sheet1!$A:$A)
Number of Columns: 1
Note: for a dynamic number of columns, replace the 1 with:
COUNTA(Sheet1!$1:$1)


this would create a range name for a1 to the last value

in column a


--
duane


----------------------------------------------------------

--------------
duane's Profile: http://www.excelforum.com/member.php?

action=getinfo&userid=11624
View this thread:

http://www.excelforum.com/showthread...hreadid=274421

.

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
macro syntax for selecting variable range Matt Excel Discussion (Misc queries) 1 October 31st 07 07:13 PM
Selecting a variable range Colin Foster[_3_] Excel Programming 3 October 26th 04 11:02 PM
Selecting a variable Range Brett[_6_] Excel Programming 1 September 9th 04 02:46 AM
Selecting Variable Row Range w/Macro steve Excel Programming 3 February 26th 04 07:24 PM
Selecting a Range Using a Variable Bob J. Excel Programming 4 September 14th 03 09:24 PM


All times are GMT +1. The time now is 11:45 AM.

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

About Us

"It's about Microsoft Excel"