View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
bpeltzer bpeltzer is offline
external usenet poster
 
Posts: 180
Default 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