Non contiguous ranges
Thanks for your reply,
Actualy, the combined cells of the area is 13,500. I tried looping through
each already, and it took a considerable amount of time. Trying to find a
faster method.
I am going to try putting the ranges into arrays, and then manipulating the
arrays.
Maybe I can use the openfile method from the destination workbook to let the
user choose the source workbook.
I was originaly just going to have them open both books, and then copy from
one, then activate the other and paste.
wrote in message
oups.com...
You could copy each individual cell:
Dim rng As Excel.Range, r As Excel.Range
Set rng = Sheets("myWorksheet").Range("rng1, rng2")
For Each r in rng
r.Copy Sheets("TargetWorksheet").Cells(r.Row, r.Column)
Next r
Let me know if that helps you.
Regards,
Steve
AD108 schrieb:
I am trying to manipulate 15 non contiguous ranges. I tried typing them
explicitly and got an error saying something about too many arguments
(for
the Range. I assume)
My next approach was to try a named range (which seems to be limited to
8
sections)
I defined two named ranges, one consisting of 7 non contiguous ranges,
and
the other consisting of 8. ("rng1" and "rng2")
I then defined a third name, "rng", as =rng1, rng2
I was then able to use different methods, such as clear contents, but
when I
tried to copy, I get runtime error 1004 with a message saying "This
commmand
cannot be used on multiple selections."
Any help would be appreciated. Thanks
AD108
--
Remove 7 numbers to email
AD108
|