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: 536
Default Copy .Areas.Item(1,2,3,4,5, etc.) to a column or a row

This little snippet does a good job of taking the non-contiguous
selected cells in named range "Fivex" and putting them in the same address on sheet 2.

How can I take the non-contiguous selected cells and list them in a column OR a row?

The commented out line renders the last selected cell in the area to the range M1.

Regards,
Howard

Option Explicit

Sub copyrng()
Dim i As Long
Dim Fivex As Range
With ActiveSheet.Range("Fivex")
For i = 1 To .Areas.Count
'.Areas.Item(i).Copy Sheets("sheet2").Range("M1")
.Areas(i).Copy Sheets("sheet2").Range(.Areas(i).Address)
Next
End With
End Sub
 
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
Copy Multiple Areas from One Workbook to Another jycpooh Excel Programming 4 October 11th 11 09:14 PM
Find item in column Copy to new location Paul Morgan Excel Programming 2 December 1st 10 02:25 PM
To find rate of each item from item.xls and to copy price.xls pol Excel Discussion (Misc queries) 7 July 16th 09 12:49 AM
What are the gray areas outside row and column identifiers? Kim Excel Discussion (Misc queries) 3 December 28th 06 07:17 PM
Copy & paste in multiple areas using VBA Rob Excel Discussion (Misc queries) 12 April 11th 05 02:09 PM


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