Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Make a graph with for cycle
Good Morning, i get this problem: i have a worksheet like this: A B C D 1 10/03 2 10/03 45 2 11/03 6 11/03 85 3 12/03 8 12/03 96 4 13/03 3 13/03 52 what i would like to do is a macro that make a graph taking columns A&B and then a second grafh taking columns C&D and so on... i wrote this, but it does not work (in my spreadsheet i get 146 columns and 256 rows...): For i = 1 To 146 Range(.Cells(i, 2), .Cells(i + 1, 256)).Select Range(Selection, Selection.End(xlDown)).Select Charts.Add ActiveChart.ChartType = xlAreaStacked ActiveChart.SetSourceData Source:=Sheets("INDUSTRIALS").Range(.Cells(i, 2), .Cells(i + 1, 256)), _ PlotBy:=xlColumns ActiveChart.Location Whe=xlLocationAsObject, Name:="INDUSTRIALS" With ActiveChart HasTitle = True ChartTitle.Characters.Text = "Asset Swap Spread Bid" Axes(xlCategory, xlPrimary).HasTitle = False Axes(xlValue, xlPrimary).HasTitle = False End With ActiveChart.Legend.Select Selection.Delete Next i End Sub any help? thank you! ------------------------------------------------ ~~ Message posted from http://www.ExcelTip.com/ ~~View and post usenet messages directly from http://www.ExcelForum.com/ |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
how to make a bar graph | New Users to Excel | |||
How do I make a graph with 2-cycle X 3-cycle log-log graph paper? | Charts and Charting in Excel | |||
Excel log graph with PARTIAL CYCLE | Charts and Charting in Excel | |||
Can I make a graph to be a specific size? (actual graph) | Excel Discussion (Misc queries) | |||
How do I keep result from 1 iteration cycle to use in next cycle? | Excel Discussion (Misc queries) |