Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.charting
William
 
Posts: n/a
Default Hard-code source data

Hi Melanie

If you do not want to use dynamic names and you do not mind a macro doing
the job for you once a month, then...
1) Create a list of the names of each chart in, say, a new worksheet - name
the range, (without inverted commas), "chartlist".
2) In the column to the right ot your "chartlist" range, enter the source
data range for each chart (eg B2:M3)..
3) In the third column, enter the sheet name where the chart is located.

Then try the following code.....

Sub ChartRangeTest()
Dim c As Range, r As Range
Set r = Sheets("Sheet2").Range("chartlist")
For Each c In r
Sheets(c.Offset(0, 2).Text).ChartObjects(c.Text).Chart.SetSourceData _
Source:=Sheets(c.Offset(0, 2).Text).Range(c.Offset(0, 1))
Next c
End Sub

--


XL2003
Regards

William



"Melanie Martin" <Melanie
wrote in message
...
Is there any method other than using Dynamic Names/OFFSET to force a chart
to
always use specific columns and rows, regardless of whether or not new
ones
are added.

We have multiple spreadsheets that track monthly metrics. Each month a
new
column is added representing a new month of data. I always want to show
columns B-M to refelct the past twelve months. Currently when I add a new
column representing a new month,the charts dymanically change to show
columns
C-N and I have to change over 20 charts back to B-M.

Thanks!
Melanie Martin



  #2   Report Post  
Posted to microsoft.public.excel.charting
Melanie Martin
 
Posts: n/a
Default Hard-code source data

Awesome. Thank you William for your help.
Melanie
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
Data from Excel to Access Table Secret Squirrel Excel Discussion (Misc queries) 11 December 2nd 05 11:58 PM
Help PLEASE! Not sure what answer is: Match? Index? Other? baz Excel Worksheet Functions 7 September 3rd 05 03:47 PM
MS Query Data Source Change rasinc Excel Discussion (Misc queries) 2 July 27th 05 07:09 PM
Need Formula to display pivot table source data Don S Excel Worksheet Functions 3 February 23rd 05 10:13 PM
Using Excel workbook as data source for word mailmerge Graham Excel Discussion (Misc queries) 3 February 1st 05 03:39 PM


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