Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 57
Default how to merge two ranges

I have

dim fields1, fildes2, fields3 as range

i want to do set fields3=fields1+fields2
fields3.select

how do i do this in code?





  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,501
Default how to merge two ranges

Hi,

When you dim ranges note how i've done it otherwise you range is dimensioned
as Variant

Dim fields1 As Range, fields2 As Range, fields3 As Range
Set fields1 = Range("A1:A10")
Set fields2 = Range("C1:C10")

Set fields3 = Union(fields1, fields2)
fields3.Select

Mike

"sunilpatel" wrote:

I have

dim fields1, fildes2, fields3 as range

i want to do set fields3=fields1+fields2
fields3.select

how do i do this in code?






Reply
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
merge named ranges ? rolando Charts and Charting in Excel 2 March 1st 09 10:04 AM
merge named ranges Roland Excel Worksheet Functions 1 November 10th 08 01:30 PM
How to merge 2 ranges from to worksheets? mikeb Excel Programming 2 November 20th 06 03:11 AM
merge ranges Jim Thomlinson[_5_] Excel Programming 0 February 4th 06 11:04 PM
Merge ranges based on condition BrianDP1977[_15_] Excel Programming 3 December 9th 05 01:14 AM


All times are GMT +1. The time now is 12:34 PM.

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

About Us

"It's about Microsoft Excel"