Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|