Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
How do I use SetSourceData to get information from two different worksheets?
I have two matching tables on two worksheets and I would like to be able to chart similar data from the two sheets. eg. Chart5.SetSourceData Source:=Sheets("ResultsIn").Range("D3:D15,E3:E15") , And _ Sheets("ResultsOut").Range("D3:D15,E3:E15"), _ PlotBy:=xlColumns David |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
set the source to one of the ranges, then add a new series from the other.
-- Regards, Tom Ogilvy "David" wrote: How do I use SetSourceData to get information from two different worksheets? I have two matching tables on two worksheets and I would like to be able to chart similar data from the two sheets. eg. Chart5.SetSourceData Source:=Sheets("ResultsIn").Range("D3:D15,E3:E15") , And _ Sheets("ResultsOut").Range("D3:D15,E3:E15"), _ PlotBy:=xlColumns David |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks Tom, that was quick!
Sorry I'm still a little new though. What is the code to add a series? David "Tom Ogilvy" wrote: set the source to one of the ranges, then add a new series from the other. -- Regards, Tom Ogilvy "David" wrote: How do I use SetSourceData to get information from two different worksheets? I have two matching tables on two worksheets and I would like to be able to chart similar data from the two sheets. eg. Chart5.SetSourceData Source:=Sheets("ResultsIn").Range("D3:D15,E3:E15") , And _ Sheets("ResultsOut").Range("D3:D15,E3:E15"), _ PlotBy:=xlColumns David |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Slight modification of an example that was prevously posted by Jon Peltier:
With Worksheets("Review") Set rngCht = .Range(.Cells(11, 7), .Cells(11, 24)) End With With ActiveChart.SeriesCollection.NewSeries .Name = Worksheets("Review").Cells(vX, 2) .Values = rngCht End With You might want to check out some of his stuff if you do much Chart programming John Peltier http://peltiertech.com/ http://pubs.logicalexpressions.com/P...cle.asp?ID=209 Charting FAQs List of articles by Peltie http://pubs.logicalexpressions.com/P...Search&AUTH=25 -- Regards, Tom Ogilvy "David" wrote: Thanks Tom, that was quick! Sorry I'm still a little new though. What is the code to add a series? David "Tom Ogilvy" wrote: set the source to one of the ranges, then add a new series from the other. -- Regards, Tom Ogilvy "David" wrote: How do I use SetSourceData to get information from two different worksheets? I have two matching tables on two worksheets and I would like to be able to chart similar data from the two sheets. eg. Chart5.SetSourceData Source:=Sheets("ResultsIn").Range("D3:D15,E3:E15") , And _ Sheets("ResultsOut").Range("D3:D15,E3:E15"), _ PlotBy:=xlColumns David |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks Tom they look good
The code worked too. I put together the below code after looking through the list of objects and checking out help on them. Are there any problems with using SeriesCollection to do the same thing here? ActiveChart.SeriesCollection.Add Source:=Worksheets("ResultsOut").Range(ChartRange) David "Tom Ogilvy" wrote: Slight modification of an example that was prevously posted by Jon Peltier: With Worksheets("Review") Set rngCht = .Range(.Cells(11, 7), .Cells(11, 24)) End With With ActiveChart.SeriesCollection.NewSeries .Name = Worksheets("Review").Cells(vX, 2) .Values = rngCht End With You might want to check out some of his stuff if you do much Chart programming John Peltier http://peltiertech.com/ http://pubs.logicalexpressions.com/P...cle.asp?ID=209 Charting FAQs List of articles by Peltier http://pubs.logicalexpressions.com/P...Search&AUTH=25 -- Regards, Tom Ogilvy "David" wrote: Thanks Tom, that was quick! Sorry I'm still a little new though. What is the code to add a series? David "Tom Ogilvy" wrote: set the source to one of the ranges, then add a new series from the other. -- Regards, Tom Ogilvy "David" wrote: How do I use SetSourceData to get information from two different worksheets? I have two matching tables on two worksheets and I would like to be able to chart similar data from the two sheets. eg. Chart5.SetSourceData Source:=Sheets("ResultsIn").Range("D3:D15,E3:E15") , And _ Sheets("ResultsOut").Range("D3:D15,E3:E15"), _ PlotBy:=xlColumns David |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Populating worksheets from source worksheet | Excel Worksheet Functions | |||
I need to populate different worksheets from a source worksheet. | Excel Worksheet Functions | |||
Combing source data from 2 worksheets. | Charts and Charting in Excel | |||
How to source data from multiple worksheets in a PivotTable? | Excel Programming | |||
Multiple Source Worksheets | Excel Programming |