LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default union of named ranges based only on the names of those ranges

dim rng as Range
set rng = Range("Data")

if you are doing it in a sheet module and the named range refers to cells on
another sheet then you will need to qualify it with that sheet name

set rng = Worksheets("ABC").Range("Data")

or
set rng = Thisworkbook.Names("Data").ReferstoRange

of course this assumes that the name Data actually refers to a range.

--
Regards,
Tom Ogilvy

"sloth" wrote in message
ups.com...
Thanks Peter. I did that and it appeared to work, but when I tried to
assign the new name range (data) to a range variable (rng1) I got the
following error:

Method 'Range' of object '_Global' failed

Any thoughts?



 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
relative Named Ranges based on worksheet Fr. Robert Excel Worksheet Functions 5 June 2nd 09 08:27 PM
Copy worksheet with named ranges to new workbook and keep names Sandy Excel Worksheet Functions 0 July 11th 08 04:37 PM
Copy data in named ranges to a newer version of the same template to identical ranges handstand Excel Programming 0 August 21st 06 03:51 PM
named ranges - changing ranges with month selected gr8guy Excel Programming 2 May 28th 04 04:50 AM
VBA union of two ranges s[_2_] Excel Programming 1 August 21st 03 02:18 AM


All times are GMT +1. The time now is 02:22 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"