Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 921
Default Variable Range to be used in a chart

I would like to set up a variable range that I can use in a chart.

I am tracking five columns of data that I add to every day. I would like to
track the most recent three weeks in a chart.

I am thinking that this should be do-able using some variation of the offset
function and the Max function but I am not really sure how to set it up any
ideas would be appreciated

=OFFSET(Sheet1!$A$3,0,0,COUNTA(Sheet1!$A$2:$A$550) ,1)





--
Jeff
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,180
Default Variable Range to be used in a chart

Variable ranges are also known as dynamic named ranges
and are very well explained by Debra Dalgleish at
http://www.contextures.com
Here is a charting example.
Assume this represents data for the last 14 days
and you want to XY plot the last 5 days:

XData YData
2.9 19.4
3.5 18.1
3.6 17.7
4.7 16.5
6.9 16.7
7.5 15.6
8.2 14.3
9.1 12.1
9.5 12.4
10.6 10.3
12.6 9.3
13.4 8.3
13.3 8.0
15.2 6.8

Insert Name Define Names in workbook XData
Refers To: =$A$2:$A$1000
(make it much longer than the actual data)
Also define these names
YData
Refers To: =$B$2:$B$1000
DLen
Refers To: =COUNTA(XData)
DSub
Refers To: =5
XPlot
Refers To: =INDEX(XData,DLen-DSub+1):INDEX(XData,DLen)
YPlot
Refers To: =INDEX(YData,DLen-DSub+1):INDEX(YData,DLen)
Chart Source Data X Values: =Sheet1!XPlot
Y Values: =Sheet1!YPlot
As you add data to XData and YData, the chart will
automatically update.


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 Step Chart using range names Michel Gerday Charts and Charting in Excel 6 March 1st 06 12:50 AM
Charting data points and show a target range on the same chart. Minireefkeeper Charts and Charting in Excel 6 February 18th 06 06:50 PM
How to create a chart based on a 2 dim data range dynamical in 1 d Beertje Charts and Charting in Excel 1 October 25th 05 11:54 AM
Altering the range that is plotted by a chart via VBA Peter Rooney Charts and Charting in Excel 4 October 21st 05 10:59 AM
How can I assign a range starting cell based on a variable locati. feman007 Excel Discussion (Misc queries) 1 March 9th 05 11:41 PM


All times are GMT +1. The time now is 04:16 PM.

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"