ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Help (https://www.excelbanter.com/excel-programming/437851-help.html)

GC

Help
 
Hello,
I am trying to set the series of 4 different charts with data from 4
seperate sheets. My sheets are called S1, S2, S3 and S4.
In the example below, I want to substitute the 1 with the variable Count.
What would be the correct syntax.

ActiveChart.SeriesCollection(1).Values = "='S1'!R2C16:R37C16"
Next

I have tried the following:
ActiveChart.SeriesCollection(1).Values = "='S"& Count"'!R2C16:R37C16"
and many variations of this. Can't seem to get it right.

Cheers,
Gerry



Fred Smith[_4_]

Help
 
You need another ampersand:
"='S"& Count & "'!R2C16:R37C16"

Regards,
Fred

"GC" wrote in message
...
Hello,
I am trying to set the series of 4 different charts with data from 4
seperate sheets. My sheets are called S1, S2, S3 and S4.
In the example below, I want to substitute the 1 with the variable Count.
What would be the correct syntax.

ActiveChart.SeriesCollection(1).Values = "='S1'!R2C16:R37C16"
Next

I have tried the following:
ActiveChart.SeriesCollection(1).Values = "='S"& Count"'!R2C16:R37C16"
and many variations of this. Can't seem to get it right.

Cheers,
Gerry



GC

Help
 
Thanks Fred! Have a great and happy New Year.

Gerry
"Fred Smith" wrote in message
...
You need another ampersand:
"='S"& Count & "'!R2C16:R37C16"

Regards,
Fred

"GC" wrote in message
...
Hello,
I am trying to set the series of 4 different charts with data from 4
seperate sheets. My sheets are called S1, S2, S3 and S4.
In the example below, I want to substitute the 1 with the variable Count.
What would be the correct syntax.

ActiveChart.SeriesCollection(1).Values = "='S1'!R2C16:R37C16"
Next

I have tried the following:
ActiveChart.SeriesCollection(1).Values = "='S"& Count"'!R2C16:R37C16"
and many variations of this. Can't seem to get it right.

Cheers,
Gerry





Fred Smith[_4_]

Help
 
Glad to help. Thanks for the feedback.

Fred.

"GC" wrote in message
...
Thanks Fred! Have a great and happy New Year.

Gerry
"Fred Smith" wrote in message
...
You need another ampersand:
"='S"& Count & "'!R2C16:R37C16"

Regards,
Fred

"GC" wrote in message
...
Hello,
I am trying to set the series of 4 different charts with data from 4
seperate sheets. My sheets are called S1, S2, S3 and S4.
In the example below, I want to substitute the 1 with the variable
Count. What would be the correct syntax.

ActiveChart.SeriesCollection(1).Values = "='S1'!R2C16:R37C16"
Next

I have tried the following:
ActiveChart.SeriesCollection(1).Values = "='S"& Count"'!R2C16:R37C16"
and many variations of this. Can't seem to get it right.

Cheers,
Gerry







All times are GMT +1. The time now is 12:46 PM.

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