chart source data code

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am trying to select a range for chart data. Can someone enlighten me why
the following line does not work:

ActiveChart.SeriesCollection(1).XValues = _
Sheets("8 count noif ").Range(Cells(5, 11), Cells(12, 11))

Thank you!
 
Try this -

With Sheets("8 count noif ")
ActiveChart.SeriesCollection(1).XValues = _
..Range(.Cells(5, 11), .Cells(12, 11))
End With

Strange spelling for a sheet name with the trailing space, but it seems to
work OK

Regards,
Peter T
 
it worked, you are the man!

Peter T said:
Try this -

With Sheets("8 count noif ")
ActiveChart.SeriesCollection(1).XValues = _
..Range(.Cells(5, 11), .Cells(12, 11))
End With

Strange spelling for a sheet name with the trailing space, but it seems to
work OK

Regards,
Peter T
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top