Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Yossi
 
Posts: n/a
Default Reference to a dynamic range

Hi,
Is there a simple/elegant way to refer to a range that is constantly changes?
For example if I have a sheet that holds some data in a range and it is
being constantly updated by adding rows or removing rows, is there a way to
refer to the current range without the need to change the formulas every time
a row is being added or removed?
  #2   Report Post  
Sunil Jayakumar
 
Posts: n/a
Default

Hi Yossi,

The simplest way would be to use range names - this way you only need to
re-define the range name to update the formule.

Let's say you have a list on one sheet, and a Pivot Table on the other.
Rather than having to repoint the Pivot Table at the whole new range, if the
Pivot Table was just based on range 'PivotData', all you would have to do
would be to update the definition of the 'PivotData' range.

This can be done manually - select the block, and InsertNameDefine, or you
can use the macro below (adjust as necessary).

Sub SetRange()

Sheets("Sheet1").Select
Range("A5").Select
Selection.CurrentRegion.Select
ActiveWorkbook.Names.Add Name:="rangename2",
RefersToR1C1:=Selection.CurrentRegion

End Sub

Hope this helps

Sunil Jayakumar

"Yossi" wrote in message
...
Hi,
Is there a simple/elegant way to refer to a range that is constantly
changes?
For example if I have a sheet that holds some data in a range and it is
being constantly updated by adding rows or removing rows, is there a way
to
refer to the current range without the need to change the formulas every
time
a row is being added or removed?


www.ayyoo.com/loans.html


  #3   Report Post  
Duke Carey
 
Posts: n/a
Default

See the advice at this link

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



"Yossi" wrote:

Hi,
Is there a simple/elegant way to refer to a range that is constantly changes?
For example if I have a sheet that holds some data in a range and it is
being constantly updated by adding rows or removing rows, is there a way to
refer to the current range without the need to change the formulas every time
a row is being added or removed?

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
Dynamic Range for Function (Vlookup etc) IshtiaqM Excel Worksheet Functions 4 March 27th 05 09:47 PM
Dynamic Print Range Help waxwing Excel Worksheet Functions 2 February 21st 05 03:47 PM
Add up a Dynamic Range with 2 Variables John Excel Worksheet Functions 2 January 15th 05 05:03 PM
Add a Dynamic Range with 2 Conditions Q John Excel Worksheet Functions 7 December 23rd 04 02:58 PM
How do I reference and sort a range of numbers in Excel 97? Old Northern Excel Worksheet Functions 3 December 14th 04 03:15 PM


All times are GMT +1. The time now is 03:53 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"