Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Copy variable sized range to single column...
Hello,
I have users selecting a range which I'm using on another spreadsheet, but I need a way to have all of the cells, wherever they come from copied over into one single column where they can be sorted, formatted etc. How can I do this in VBA? Any suggestions would be very welcome. Thanks in advance, Jed |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Copy variable sized range to single column...
Hi Jed;
Here is one way to copy a selection to a single column Sub Copytest() 'Copies from current selection Cnt = Selection.Cells.Count 'My other workbook With Workbooks("Book2").Worksheets("Sheet1") For Item = 1 To Cnt 'Pastes to 2nd workbook Selection.Cells(Item).Copy .Cells(Item, "A") Next Item End With End Sub hope this helps David "Jed" wrote: Hello, I have users selecting a range which I'm using on another spreadsheet, but I need a way to have all of the cells, wherever they come from copied over into one single column where they can be sorted, formatted etc. How can I do this in VBA? Any suggestions would be very welcome. Thanks in advance, Jed |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Using variable sized range in CountIf() | Excel Discussion (Misc queries) | |||
Copy column range of "single word" cells with spaces to a single c | Excel Discussion (Misc queries) | |||
Copy pasting a range in to a single column | Excel Programming | |||
Getting values from a variable sized range into an array | Excel Programming | |||
Summing a variable sized range programmatically | Excel Programming |