Cell reference for chart point
New to excel vba.. I am trying to reference a cell value for a chart point and I get an error at this line:
ActiveChart.SeriesCollection(1).Points(Sheets("Sheet1"), Range("C1")).ApplyDataLabels
Any help is appreciated
ExcelExperts.comExcel Consultancy, VBA Consultancy, Training and Tips Call:+442081234832 |
|
Excel / VBA ConsultancyFree Training VideosFree SpreadsheetsExcel / VBA JobsNavigationWho's onlineThere are currently 0 users and 1025 guests online.
New Excel Experts
Current Excel / VBA Jobs |
Cell reference for chart pointNew to excel vba.. I am trying to reference a cell value for a chart point and I get an error at this line: ActiveChart.SeriesCollection(1).Points(Sheets("Sheet1"), Range("C1")).ApplyDataLabels Any help is appreciated |
Highest Ranked Users
Recent Blogs
ForumsRecent comments
User login |
RE: Cell reference for chart point
Hello,
If you want to apply data label to a specific point you must use point index. For example, if Sheet1.Range("C1") represent point number two in the series, use the following code:
ActiveChart.SeriesCollection(1).Points(2).ApplyDataLabels
If you want to apply data label to all points in the series, use the following code:
ActiveChart.SeriesCollection(1).ApplyDataLabels
I hope this will help you.
Best regards.