View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Pilgrim Pilgrim is offline
external usenet poster
 
Posts: 1
Default setting a range variable equal to the value of a string variable

Is it possible to set a range variable as the value of a strin
variable. For instance, I'm trying to set a string variable equal t
the address of several discontiguous cells, then set the a rang
variable equal to the cell locations and put them in a chart. I'v
loaded several cell locations in a string variable so the variable ha
a value like:

StrVar = "A1,A7,A34,A34"

But if I try

RangeVar = Range(StrVar)

or

RangeVar = Range("StrVar")

It tries to evluate StrVar as a cell or cell name. Can I get the rang
mode to use the value of StrVar instead of the variable itself

--
Message posted from http://www.ExcelForum.com