John Carney
asked on
Creating custom data labels in a chartseries
Please take a look at the attached workbook. I need to get my chart values from Row 4, but I want to get my data labels from Row 5.
How do I do that? Assuming thatI can have a custom label other than series, category or value.
Thanks,
John
Custom-Data-Labels.xlsx
How do I do that? Assuming thatI can have a custom label other than series, category or value.
Thanks,
John
Custom-Data-Labels.xlsx
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Sub GetDataLabels()
Dim i As Long, Ln As Range
ActiveSheet.ChartObjects("
ActiveChart.SetElement (msoElementPrimaryValueAxi
ActiveChart.ChartArea.Sele
ActiveChart.SeriesCollecti
For i = 1 To 13
Set Ln = Sheets("Weeks Done").Cells(6, i + 23)
ActiveChart.SeriesCollecti
ActiveChart.SeriesCollecti
Left(Sheets("Weeks Done").Cells(5, i + 23), Ln) & vbLf & _
Right(Sheets("Weeks Done").Cells(5, i + 23), Ln)
ActiveChart.SeriesCollecti
Next i
With ActiveChart.Axes(xlValue)
.MinimumScale = [Lo]
.MaximumScale = [Hi]
.MinorUnitIsAuto = True '.MajorUnit = [XAxisMajor]
End With
ActiveChart.Axes(xlValue, xlPrimary).Delete
[A1].Select
End Sub
Thanks,
John