Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5
Default setting scale for graphs

Instead of having to enter numbers manuallly, is it possible to point
the Max and Min values under Scale for a graph to specific cells in
the spreadsheet?
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 36
Default setting scale for graphs

On Mar 4, 11:14*am, namsilat wrote:
Instead of having to enter numbers manuallly, is it possible to point
the Max and Min values under Scale for a graph to specific cells in
the spreadsheet?


Here is a recorded macro. Just change the reference
..MinimumScale =range("a2")
..MaximumScale = range("a3")


Sub Macro7()
'
' Macro7 Macro
' Macro recorded 3/5/2011 by Donald B. Guillett
'

'
ActiveSheet.ChartObjects("Chart 1").Activate
ActiveChart.Axes(xlValue).Select
With ActiveChart.Axes(xlValue)
.MinimumScale = 5
.MaximumScale = 25
.MinorUnitIsAuto = True
.MajorUnitIsAuto = True
.Crosses = xlAutomatic
.ReversePlotOrder = False
.ScaleType = xlLinear
.DisplayUnit = xlNone
End With
End Sub
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5
Default setting scale for graphs

Thanks for the macro. I forgot to mention that the charts are in
another sheet, while the soruce data are in sheet 1.


On Sat, 5 Mar 2011 09:46:57 -0800 (PST), Donald Guillett
wrote:

On Mar 4, 11:14?am, namsilat wrote:
Instead of having to enter numbers manuallly, is it possible to point
the Max and Min values under Scale for a graph to specific cells in
the spreadsheet?


Here is a recorded macro. Just change the reference
.MinimumScale =range("a2")
.MaximumScale = range("a3")


Sub Macro7()
'
' Macro7 Macro
' Macro recorded 3/5/2011 by Donald B. Guillett
'

'
ActiveSheet.ChartObjects("Chart 1").Activate
ActiveChart.Axes(xlValue).Select
With ActiveChart.Axes(xlValue)
.MinimumScale = 5
.MaximumScale = 25
.MinorUnitIsAuto = True
.MajorUnitIsAuto = True
.Crosses = xlAutomatic
.ReversePlotOrder = False
.ScaleType = xlLinear
.DisplayUnit = xlNone
End With
End Sub

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Chart setting scale Ker Charts and Charting in Excel 3 March 11th 09 04:28 PM
Code about setting Y Axes scale. fujing1003[_2_] Charts and Charting in Excel 3 December 11th 07 12:29 PM
Setting chart scale min/max in VBA [email protected] Charts and Charting in Excel 2 January 30th 07 10:11 PM
Setting rules for y scale nospaminlich Charts and Charting in Excel 2 May 23rd 06 12:31 PM
Setting the X axis scale/font CLR Charts and Charting in Excel 2 February 13th 05 09:32 PM


All times are GMT +1. The time now is 10:32 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"