ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   how to add 2 ranges (https://www.excelbanter.com/excel-programming/282028-how-add-2-ranges.html)

kotharu[_8_]

how to add 2 ranges
 

how to add 2 ranges


------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~View and post usenet messages directly from http://www.ExcelForum.com/


Patrick Molloy[_12_]

how to add 2 ranges
 

Dim target As Range, source1 As Range, source2 As Range

Set source1 = Sheet1.Range("A1:G5")
Set source2 = Sheet1.Range("K1:L5")


Set target = Union(source1, source1)


Patrick Molloy
Microsoft Excel MVP

-----Original Message-----

how to add 2 ranges


------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~View and post usenet messages directly from

http://www.ExcelForum.com/

.


kotharu[_9_]

how to add 2 ranges
 

Thank you


------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~View and post usenet messages directly from http://www.ExcelForum.com/



All times are GMT +1. The time now is 04:14 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com