Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Greetings-
I have a spreadsheet that has roughly 4500 rows with 7 columns of data Along each row I need to make a line graph that uses the values fro the seven columns in that row. Seeing as though creating each chart one by one would take FOREVER was wondering if there is a way to write a program that will do thi for me? I purchased a book called "Writing Excel Macros" by Steven Roman. Bu I am still having trouble finding anything that will help. If someon could help me, or direct me where to go it would be very muc appreciated. Thank you -- Message posted from http://www.ExcelForum.com |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
What is the purpose of creating all those graphs? Do you really need
to create them all at the same time or could you just create a block at a time? In the past when creating large numbers of plots from the same datablock I've found it works well to create a graph, copy a picture of it and paste it into another sheet, shift the graph data source to the next row, copy picture etc etc. If you need to get a start you might try recording a macro while creating the first graph and use that as a basis. Be warned that 4500 plots is a large number for one spreadsheet so you may not be able to create them all in one batch. You can contact me via email if you are really stuck and I'll try digging out some previous code... Tim. "canes_26 " wrote in message ... Greetings- I have a spreadsheet that has roughly 4500 rows with 7 columns of data. Along each row I need to make a line graph that uses the values from the seven columns in that row. Seeing as though creating each chart one by one would take FOREVER I was wondering if there is a way to write a program that will do this for me? I purchased a book called "Writing Excel Macros" by Steven Roman. But I am still having trouble finding anything that will help. If someone could help me, or direct me where to go it would be very much appreciated. Thank you. --- Message posted from http://www.ExcelForum.com/ |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
Assuming there is a unique value in you first column: Option Explicit Sub MakeGraphs() Dim lRow As Long Dim sSheet As String Dim sGraph As String Dim sSource As String ' Application.ScreenUpdating = False sSheet = ActiveSheet.Name For lRow = 2 To ActiveSheet.UsedRange.Rows.Count sSource = "A1:G1,A" & CStr(lRow) & ":G" & CStr(lRow) Range(sSource).Select Range("A" & CStr(lRow)).Activate sGraph = ActiveCell.Value Charts.Add ActiveChart.ChartType = xlLineMarkers ActiveChart.SetSourceData _ Source:=Sheets(sSheet).Range(sSource), _ PlotBy:=xlRows ActiveChart.Location Whe=xlLocationAsNewSheet With ActiveChart .HasTitle = True .ChartTitle.Characters.Text = sGraph .Axes(xlCategory, xlPrimary).HasTitle = False .Axes(xlValue, xlPrimary).HasTitle = False End With ActiveSheet.Name = sGraph Sheets(sSheet).Activate Next Application.ScreenUpdating = True End Sub Good luck, Wouter HM. canes_26 wrote in message ... Greetings- I have a spreadsheet that has roughly 4500 rows with 7 columns of data. Along each row I need to make a line graph that uses the values from the seven columns in that row. Seeing as though creating each chart one by one would take FOREVER I was wondering if there is a way to write a program that will do this for me? I purchased a book called "Writing Excel Macros" by Steven Roman. But I am still having trouble finding anything that will help. If someone could help me, or direct me where to go it would be very much appreciated. Thank you. --- Message posted from http://www.ExcelForum.com/ |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Color coding data in line graphs | Charts and Charting in Excel | |||
Creating graphs from data in other files | Excel Discussion (Misc queries) | |||
Creating Multiple Graphs at a Time | Charts and Charting in Excel | |||
Creating Circles on Excel Graphs | Excel Worksheet Functions | |||
Creating two bar graphs | Charts and Charting in Excel |