Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.charting
Barb Reinhardt
 
Posts: n/a
Default Changing series information for approximately 60 series in a workb

I have a worksheet with the following in a list:

Column A: Worksheet name
Column B: chart name (i.e. Chart 1, Chart 3, Chart 9)
Column C: Series number in the chart
Column N: X values for series (as a named range)
Column J: Y values for series (as a named range)

Row 2 contains the first data entry.

I'd like to modify all of the series in the workbook so that it contains the
values on this worksheet. Actually, I'm trying to get it set up to have
dynamic charts so that we plot only the last 12 months worth of data. I've
got the names figured out so that works, but want to "import" all of this
info in one fell swoop. Can someone assist me with the code?

Thanks in advance,
Barb Reinhardt
  #2   Report Post  
Posted to microsoft.public.excel.charting
Andy Pope
 
Posts: n/a
Default Changing series information for approximately 60 series in aworkb

Hi,

Here is a starting point. There is no error trapping in this so if a
sheetname or range name is wrong then it will fail.

Sub Barb()

Dim strSheetName As String
Dim strChartName As String
Dim strLabelNR As String
Dim strDataNR As String
Dim rngInput As Range
Dim rngTemp As Range
Dim objCht As ChartObject
Dim intSeries As Integer

With ActiveSheet
Set rngInput = .Range("A1", .Range("A" & .Rows.Count).End(xlUp))
End With
For Each rngTemp In rngInput
With rngTemp
strSheetName = .Offset(0, 0)
strChartName = .Offset(0, 1)
intSeries = .Offset(0, 2)
strLabelNR = .Offset(0, 13)
strDataNR = .Offset(0, 9)
End With
With Worksheets(strSheetName).ChartObjects(strChartName ).Chart
With .SeriesCollection(intSeries)
.Values = "='" & strSheetName & "'!" & strDataNR
.XValues = "='" & strSheetName & "'!" & strLabelNR
End With
End With
Next

End Sub

Cheers
Andy

Barb Reinhardt wrote:
I have a worksheet with the following in a list:

Column A: Worksheet name
Column B: chart name (i.e. Chart 1, Chart 3, Chart 9)
Column C: Series number in the chart
Column N: X values for series (as a named range)
Column J: Y values for series (as a named range)

Row 2 contains the first data entry.

I'd like to modify all of the series in the workbook so that it contains the
values on this worksheet. Actually, I'm trying to get it set up to have
dynamic charts so that we plot only the last 12 months worth of data. I've
got the names figured out so that works, but want to "import" all of this
info in one fell swoop. Can someone assist me with the code?

Thanks in advance,
Barb Reinhardt


--

Andy Pope, Microsoft MVP - Excel
http://www.andypope.info
  #3   Report Post  
Posted to microsoft.public.excel.charting
Jon Peltier
 
Posts: n/a
Default Changing series information for approximately 60 series in a workb

Barb -

I wrote myself a little add-in for just this sort of problem. You may be
able to make use of it:

http://peltiertech.com/Excel/Charts/ChgSrsFmla.html

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Peltier Technical Services
Tutorials and Custom Solutions
http://PeltierTech.com/
_______


"Barb Reinhardt" wrote in message
...
I have a worksheet with the following in a list:

Column A: Worksheet name
Column B: chart name (i.e. Chart 1, Chart 3, Chart 9)
Column C: Series number in the chart
Column N: X values for series (as a named range)
Column J: Y values for series (as a named range)

Row 2 contains the first data entry.

I'd like to modify all of the series in the workbook so that it contains
the
values on this worksheet. Actually, I'm trying to get it set up to have
dynamic charts so that we plot only the last 12 months worth of data.
I've
got the names figured out so that works, but want to "import" all of this
info in one fell swoop. Can someone assist me with the code?

Thanks in advance,
Barb Reinhardt



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
Changing "Series" Name jerry chapman Charts and Charting in Excel 3 April 23rd 23 11:45 AM
How to change Series order in a Combination Chart? vrk1 Charts and Charting in Excel 3 April 1st 05 07:21 AM
series graph -- one series being added to another series rich zielinski via OfficeKB.com Charts and Charting in Excel 3 March 30th 05 06:23 PM
Changing the color of a Series Collection using visual basic? Koreef Charts and Charting in Excel 1 March 17th 05 03:17 AM
Quickly Changing Several Series to Appear the Same Barb Reinhardt Charts and Charting in Excel 2 February 7th 05 03:10 PM


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