Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.charting
|
|||
|
|||
![]()
Hi,
I have a bunch of excel files full of data, and each one contains information which needs to be made into 30 charts (scatterplots). I have been hand selecting the data and then creating each chart manually, but I am hoping there is a way to automatize the process. Basically what I need to do is this: 3 adjacent columns of data look down column 1 for the word "stop" (the rest are all numbers) when you get to stop, select all three columns until the next time there's a "stop" in column 1 make the scatterplot do it again from the next stop (the stop lines can just be skipped when selecting data for the chart) Does anyone have any pointers for me? Thanks so much! Christina |
#2
![]()
Posted to microsoft.public.excel.charting
|
|||
|
|||
![]()
Forgot the code!
Sub ChartBetweenStops() Dim rStop1 As Range Dim rStop2 As Range Dim rStopFirst As Range Dim rChartData As Range Dim cht As Chart ActiveSheet.Range("A1").Select Set rStopFirst = ActiveSheet.Cells.Find(What:="stop", After:=ActiveCell) Set rStop2 = rStopFirst Do Set rStop1 = rStop2 Set rStop2 = Cells.FindNext(After:=rStop1) If rStop2.Address = rStopFirst.Address Then Exit Do Set rChartData = rStop1.Offset(1).Resize(rStop2.Row - rStop1.Row - 1, 3) Set cht = ActiveSheet.ChartObjects.Add(rStop1.Offset(, 3).Left, rStop1.Offset(1).Top, 250, 200).Chart With cht .ChartType = xlXYScatter .SetSourceData Source:=rChartData ' include other chart formatting here End With Loop End Sub - Jon ------- Jon Peltier, Microsoft Excel MVP Tutorials and Custom Solutions Peltier Technical Services, Inc. - http://PeltierTech.com _______ "Christina" wrote in message ... Hi, I have a bunch of excel files full of data, and each one contains information which needs to be made into 30 charts (scatterplots). I have been hand selecting the data and then creating each chart manually, but I am hoping there is a way to automatize the process. Basically what I need to do is this: 3 adjacent columns of data look down column 1 for the word "stop" (the rest are all numbers) when you get to stop, select all three columns until the next time there's a "stop" in column 1 make the scatterplot do it again from the next stop (the stop lines can just be skipped when selecting data for the chart) Does anyone have any pointers for me? Thanks so much! Christina |
#3
![]()
Posted to microsoft.public.excel.charting
|
|||
|
|||
![]()
Here's something quick and dirty. It uses the first column as X values and
the second and third as Y values for two series. Activate a worksheet with the data separated by cells that say "stop", and it will knock out the charts. - Jon ------- Jon Peltier, Microsoft Excel MVP Tutorials and Custom Solutions Peltier Technical Services, Inc. - http://PeltierTech.com _______ "Christina" wrote in message ... Hi, I have a bunch of excel files full of data, and each one contains information which needs to be made into 30 charts (scatterplots). I have been hand selecting the data and then creating each chart manually, but I am hoping there is a way to automatize the process. Basically what I need to do is this: 3 adjacent columns of data look down column 1 for the word "stop" (the rest are all numbers) when you get to stop, select all three columns until the next time there's a "stop" in column 1 make the scatterplot do it again from the next stop (the stop lines can just be skipped when selecting data for the chart) Does anyone have any pointers for me? Thanks so much! Christina |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Macro to create charts | Charts and Charting in Excel | |||
Is there a macro to create charts automatically? | Charts and Charting in Excel | |||
Macro to create charts? | Charts and Charting in Excel | |||
Vb macro stops when I try to create more than 89 charts | Charts and Charting in Excel | |||
Create Multiple Charts w/ VB | Charts and Charting in Excel |