Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.charting
|
|||
|
|||
![]()
Jim
Thank you! This works great. I have to do this for 100+ charts and hoped to create 1 macro that does this for each row. Row 1 has the labels in the previous example and Row 2 has the data. I would need a counter to increase by 1 (and not include Row 2 in Row 3's chart, etc.) In preparation for this, I also put the ChartTitle in Column D I've been trying to research a way to do this for bar charts on-line, but haven't found anything applicable. I know I need a loop and a counter, but not sure of where to go to find an example of cluster columns. Jeff Sub OATChartCreate() Dim chtNew As Chart '<<< ActiveCell.Resize(2.6).Select ActiveSheet.Shapes.AddChart.Select Set chtNew = ActiveChart '<<< chtNew.SetSourceData Source:=Range("'OAT Test Charts Data_Crosstab'!$F$1:$K$2") chtNew.ChartType = xlColumnClustered chtNew.Legend.Delete chtNew.HasAxis(xlValue) = True chtNew.Axes(xlValue).MinimumScale = 0 chtNew.Axes(xlValue).MaximumScale = 1 chtNew.Axes(xlValue).MajorUnit = 0.1 chtNew.Axes(xlValue).MajorUnit = 0.2 chtNew.Axes(xlValue).TickLabels.NumberFormat = "0.00%" chtNew.Axes(xlValue).TickLabels.NumberFormat = "0%" ActiveChart.ChartArea.Select chtNew.SetElement (msoElementPrimaryValueAxisTitleVertical) chtNew.SetElement (msoElementChartTitleAboveChart) chtNew.ChartTitle.Text = "Adams County - 8th Grade Mathematics Results" chtNew.Axes(xlValue, xlPrimary).AxisTitle.Text = "Percent Passing" End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
split post code (zip code) out of cell that includes full address | Excel Discussion (Misc queries) | |||
Code to conditional format all black after date specified in code? | Excel Discussion (Misc queries) | |||
Drop Down/List w/Code and Definition, only code entered when selec | Excel Worksheet Functions | |||
Convert a Number Code to a Text Code | Excel Discussion (Misc queries) | |||
copying vba code to a standard code module | Excel Discussion (Misc queries) |