View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Fan924 Fan924 is offline
external usenet poster
 
Posts: 238
Default Macro to determine min/max values of column

Thanks guys. I was really stuck.I made some small changes to Patrick's
code:

Sub TestChart1()
With ActiveSheet.ChartObjects("Chart 1").Chart.Axes(xlValue)
.MinimumScale = WorksheetFunction.Min(Range("B3:B17"))
.MaximumScale = WorksheetFunction.Max(Range("B3:B17"))
End With
End Sub

Instead of using Range("B3:B17"), I would like to read the current Y-
axis range and use that instead. Any ideas.