LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default how to avoid merging when pasting multiple ranges

Hi,

I have written a simple macro that copies multiple ranges and then pastes
them into the active cell. The problem is that the ranges are automatically
merged, while I would like them to keep their original postition in relation
to each other.

Example:

A B C D E F G
1 2 5
2 3 5
3
4 2 3
5 1 9

In this example I want to copy the two ranges A1:B2 and A4:B9, and paste
them into my active cell which here would be F2, using this simple code:

Range("A1:B2, A4:B9").Copy
ActiveCell.Paste

This is what I get:

A B C D E F G
1 2 5 2 5
2 3 5 3 5
3 2 3
4 2 3 1 9
5 1 9


This is what I want:

A B C D E F G
1 2 5 2 5
2 3 5 3 5
3
4 2 3 2 3
5 1 9 1 9


Does anyone know how to avoid the merging of the ranges?

Any help would be greatly appreciated. The problem is small. The
implications are big...

Regards
Stian
 
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
avoid turning #/## into date when pasting or parsing jimtherunner Excel Discussion (Misc queries) 5 October 27th 08 05:52 PM
Excel 2002: How to avoid pasting blanks ? Mr. Low Excel Discussion (Misc queries) 3 September 15th 07 02:17 AM
Excel 2002 : How to avoid pasting incremental refrences ? Mr. Low Excel Discussion (Misc queries) 3 August 4th 07 03:46 PM
merging ranges Rich Cooper Excel Programming 1 June 2nd 04 07:18 PM


All times are GMT +1. The time now is 04:46 AM.

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"