Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 747
Default copy and paste multiple selection

Jim,

My read when Gareth said C7:C9 (instead of C7:T9) are merged cells was that
the columns of cells within the contiguous ranges were merged independantly -
i.e. C7:C9 are one merged range and D7:D9 another etc. Your interpretation
makes more sence for the particular example because the number of areas
matches the cells in A4:F4. However, he did indicate that this was only an
example, leaving the possibility of there being multiple merged ranges or
just multiple cells within contiguous blocks. Therefore, use of Areas would
not work. Obviously, what is needed is more insight from Gareth. Thought I'd
point out my interpretation before moving on.

Regards,
Greg

"Jim Cone" wrote:

Gareth,

Yes it does. The following works...
'------------------
Sub Test()
Dim rngA As Excel.Range
Dim lngN As Long

Set rngA = Range("T5,C7:T9,T13,C15:T17,T19,C21:T23")

For lngN = 1 To rngA.Areas.Count
Range("A4")(1, lngN).Value = rngA.Areas(lngN)(1).Value
Next
Set rngA = Nothing
End Sub
'-----------------------

Jim Cone
San Francisco, USA



"Gareth" wrote in message
...
c7:c9, etc, are merged cells if that makes ant difference........




"Jim Cone" wrote in message
...
Gareth,
You can't put 10 lbs in a 5 lb bag.
There are 165 cells in...
Range("T5,C7:T9,T13,C15:T17,T19,C21:T23")
and
6 cells in...
Range("A4:F4")
Your can do this...
Sheets("Sheet2").Range("A4:F4").Value =

Sheets("Sheet1").Range("G4:L4").Value
Regards,
Jim Cone
San Francisco, USA



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
multiple selection copy & paste across multi-worksheets aw Excel Discussion (Misc queries) 0 November 29th 07 06:20 AM
Help creating a macro to copy and paste a certain selection Shu of AZ Excel Discussion (Misc queries) 0 January 8th 07 04:36 AM
Help creating a macro to copy and paste a certain selection Shu of AZ Excel Discussion (Misc queries) 2 January 7th 07 08:26 PM
selection.copy - how emulate Paste command? topola Excel Discussion (Misc queries) 1 January 7th 06 03:43 PM
Copy&Paste and Selection Change Bura Tino Excel Programming 3 November 22nd 03 01:35 AM


All times are GMT +1. The time now is 04:55 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"