ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   How to apply data formatting to a chart (https://www.excelbanter.com/excel-programming/436907-how-apply-data-formatting-chart.html)

Fan924

How to apply data formatting to a chart
 
From an earlier posting, I am using this to set the range of a chart.

' Set Chart Range Value (Y) Axis <<<<<
With ActiveSheet.ChartObjects("Chart 1").Chart.Axes(xlValue)
.MinimumScale = WorksheetFunction.Min(Range("B3:B18"))
.MaximumScale = WorksheetFunction.Max(Range("B3:B18"))
End With

' Set Chart Range Value (X) Axis <<<<<
With ActiveSheet.ChartObjects("Chart 1").Chart.Axes(xlCategory)
.MinimumScale = WorksheetFunction.Min(Range("A3:A18"))
.MaximumScale = WorksheetFunction.Max(Range("A3:A18"))
End With

I would also like to read the formatting of the data and apply that to
the chart. It changes often. Excel 97


All times are GMT +1. The time now is 03:49 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com