View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Jon Peltier[_7_] Jon Peltier[_7_] is offline
external usenet poster
 
Posts: 115
Default discontiguous ranges in charts

Nathan -

If you put the variable name in quotes, the string evaluated is the
variable name, not the contents of the variable. If the variables are
string addresses, use this:

Set RangeVar = Range(RangeVar1 & ", " & RangeVar2 & ", " & RangeVar3)

If they are actual range objects:

Set RangeVar = Union(RangeVar1, RangeVar2, RangeVar3)

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Peltier Technical Services
Tutorials and Custom Solutions
http://PeltierTech.com/
_______

Pilgrim < wrote:

I'm trying to create many charts of data meeting specific requirements.
Does anyone know how to get a range mode to include several
discontiguous cells which have been loaded into range variables? I
have tried
Set RangeVar = Range("RangeVar1, RangeVar2, RangeVar3")

but that doesn't work unless you use the explicit cell positions of
RangeVar1, 2, 3, like A1, A2, and A3.

Nathan


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