Home |
Search |
Today's Posts |
#1
|
|||
|
|||
changing the scale on the graph
Sub chart()
End Sub Sub Macro1() ' ' Macro1 Macro ' Macro recorded 17/01/2007 by 01pervezm ' ' Charts.Add ActiveChart.ChartType = xl3DColumnClustered ActiveChart.SetSourceData Source:=Sheets("Sheet1").Range("A1:B4"), PlotBy:= _ xlColumns ActiveChart.Location Whe=xlLocationAsObject, Name:="Sheet1" With ActiveChart .HasTitle = True .ChartTitle.Characters.Text = "chart" .Axes(xlCategory).HasTitle = True .Axes(xlCategory).AxisTitle.Characters.Text = "x" .Axes(xlSeries).HasTitle = False .Axes(xlValue).HasTitle = True .Axes(xlValue).AxisTitle.Characters.Text = "z" End With End Sub Sub Macro2() ' ' Macro2 Macro ' Macro recorded 17/01/2007 by 01pervezm ' ' Range("A1:B4").Select Charts.Add ActiveChart.ChartType = xlBarClustered ActiveChart.SetSourceData Source:=Sheets("Sheet1").Range("A1:B4"), PlotBy:= _ xlColumns ActiveChart.Location Whe=xlLocationAsObject, Name:="Sheet1" With ActiveChart .HasTitle = True .ChartTitle.Characters.Text = "chart" .Axes(xlCategory, xlPrimary).HasTitle = True .Axes(xlCategory, xlPrimary).AxisTitle.Characters.Text = "x" .Axes(xlValue, xlPrimary).HasTitle = True .Axes(xlValue, xlPrimary).AxisTitle.Characters.Text = "y" End With With ActiveChart .HasTitle = False .Axes(xlCategory, xlPrimary).HasTitle = False .Axes(xlValue, xlPrimary).HasTitle = False End With End Sub this is a code, we were wondering if this code could be modified so it automaticly alters the values to suit the new data inputed. excel does this by default. Basicaly wut she's tryin 2 say is how do u make the x axis bigger (by not making the others smaller. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Changing Y Axis Scale with percentages (Line Graph) | Charts and Charting in Excel | |||
Changing Time Scale to Seconds on Excel Chart | Charts and Charting in Excel | |||
Changing the scale major unit in a graph | Excel Discussion (Misc queries) | |||
changing the color of a single bar on a graph | Charts and Charting in Excel | |||
Bar graph values keep changing | Charts and Charting in Excel |