Hi Everyone,
Firstly, I would like to set the scale on my Waterfall chart so it maximises the length of the bars - the Auto option on the Waterfall doesn't seem to do this very well.
Secondly, all my data changes based on a drop down for month, so I have a calculation to determine the min & max values.
I have then setup the VBA below on the sheet with the waterfall graph to trigger the change whenever cell B1 (the month) changes, however the scale doesn't seem to change??
Any help much appreciated.
Thanks
Graham
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Address = "$b$1" Then
ActiveSheet.ChartObjects("Chart 1").Activate
With ActiveChart.Axes(xlValue)
.MinimumScale = Range("b19")
.MaximumScale = Range("b20")
End With
End If
End Sub
Firstly, I would like to set the scale on my Waterfall chart so it maximises the length of the bars - the Auto option on the Waterfall doesn't seem to do this very well.
Secondly, all my data changes based on a drop down for month, so I have a calculation to determine the min & max values.
I have then setup the VBA below on the sheet with the waterfall graph to trigger the change whenever cell B1 (the month) changes, however the scale doesn't seem to change??
Any help much appreciated.
Thanks
Graham
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Address = "$b$1" Then
ActiveSheet.ChartObjects("Chart 1").Activate
With ActiveChart.Axes(xlValue)
.MinimumScale = Range("b19")
.MaximumScale = Range("b20")
End With
End If
End Sub