Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
range variables for chart x axis values
Another question related to my recent post. Some search hits come close to a
solution but don't quite hit the spot. I am altering recorded macros. The line I want to change is: ActiveChart.SeriesCollection(1).XValues = "='Traffic model'!R14C7:R32C7" I want to change !R14C7:R32C7 to a form where each row and column number is a variable. TIA again ... Greg |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
range variables for chart x axis values
Just compose the string in the format you've already got, using the &
operator to piece together the various components, along the lines of: ActiveChart.SeriesCollection(1).XValues = "='Traffic model'!R" & StartRow & "C" & StartCol & ":R" & EndRow & "C" & EndCol "gvm" wrote: Another question related to my recent post. Some search hits come close to a solution but don't quite hit the spot. I am altering recorded macros. The line I want to change is: ActiveChart.SeriesCollection(1).XValues = "='Traffic model'!R14C7:R32C7" I want to change !R14C7:R32C7 to a form where each row and column number is a variable. TIA again ... Greg |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
range variables for chart x axis values
If you have the range defined already, you can also use this:
ActiveChart.SeriesCollection(1).XValues = Worksheets("Sheet1").Range("D11:D15") or this, if rXValues is a VBA range variable: ActiveChart.SeriesCollection(1).XValues = rXValues - Jon ------- Jon Peltier, Microsoft Excel MVP Peltier Technical Services Tutorials and Custom Solutions http://PeltierTech.com/ _______ "bpeltzer" wrote in message ... Just compose the string in the format you've already got, using the & operator to piece together the various components, along the lines of: ActiveChart.SeriesCollection(1).XValues = "='Traffic model'!R" & StartRow & "C" & StartCol & ":R" & EndRow & "C" & EndCol "gvm" wrote: Another question related to my recent post. Some search hits come close to a solution but don't quite hit the spot. I am altering recorded macros. The line I want to change is: ActiveChart.SeriesCollection(1).XValues = "='Traffic model'!R14C7:R32C7" I want to change !R14C7:R32C7 to a form where each row and column number is a variable. TIA again ... Greg |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How do I Creat Comparision chart taking two variables on y-axis? | Charts and Charting in Excel | |||
Chart two variables with differing values | Charts and Charting in Excel | |||
how to put x axis values in the chart instead of x axis labels | Charts and Charting in Excel | |||
How do I change X-Axis values in a chart with 2 Y-Axis? | Charts and Charting in Excel | |||
Assigning values from a selected range to individual variables | Excel Programming |