Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
Jed Jed is offline
external usenet poster
 
Posts: 10
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 30
Default 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
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
Using variable sized range in CountIf() [email protected][_2_] Excel Discussion (Misc queries) 1 October 24th 07 11:15 AM
Copy column range of "single word" cells with spaces to a single c nastech Excel Discussion (Misc queries) 3 February 15th 06 05:04 PM
Copy pasting a range in to a single column Hari Prasadh Excel Programming 8 January 30th 05 05:34 PM
Getting values from a variable sized range into an array Ken Loomis Excel Programming 8 October 5th 04 09:04 AM
Summing a variable sized range programmatically Norma[_2_] Excel Programming 3 August 24th 03 07:31 PM


All times are GMT +1. The time now is 03:42 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"