Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.charting
|
|||
|
|||
![]()
I am writing a macro that includes assigning x-values from the third column
of Sheet 1 to the active chart: ActiveChart.SeriesCollection(1).XValues = Sheets("Sheet1").Range("C2:C105") However, when I change the range-referencing to cells-style, I get an error: ActiveChart.SeriesCollection(1).XValues = Sheets("Sheet1").Range(Cells(1,3),Cells(105,3)) The error says: "Method of 'Cells' of object '_Global' failed Does the XValues argument not take Cells-style referencing? I ask because what I really want to do is assign a variable to the range that changes according to the number of rows in the column that contain data: ActiveChart.SeriesCollection(1).XValues = Sheets("Sheet1").Range(Cells(1,3),Cells(num_rows,3 )) |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Urgent Help Required on Excel Macro Problem | Excel Discussion (Misc queries) | |||
Problem With Reference Update | Excel Worksheet Functions | |||
Syntax problem | Excel Worksheet Functions | |||
Copy an Drag cell Formula Problem | Excel Discussion (Misc queries) | |||
problem office assistant | Excel Discussion (Misc queries) |