Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 6
Default Copy multiple worksheet into one colum

I have multiple worksheets about 51 that has so many different number of rows
in each sheet that I want to copy the first 4 colums and paste them into a
new worksheet, but not side by side I would like to stack all copied rows and
columns on top of each other in the new worksheet. for example:


In the first worksheet I have.
A B C D
1 2 3 4
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 65
Default Copy multiple worksheet into one colum

I dont know if thats possible without using Visual B.
Are u familiar a little with VBA???

"sam81" wrote:

I have multiple worksheets about 51 that has so many different number of rows
in each sheet that I want to copy the first 4 colums and paste them into a
new worksheet, but not side by side I would like to stack all copied rows and
columns on top of each other in the new worksheet. for example:


In the first worksheet I have.
A B C D
1 2 3 4
.
.


"second worksheet "
A B C D
5 6 7 8
.
.

"third worksheet"
A B C D
9 10 11 12
.
.

And so on




In the new worksheet I would like to have.

A B C D
1 2 3 4
.
.
5 6 7 8
.
.
9 10 11 12
.
.

In each sheet I have many rows

Plese help.
Thank you.


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 6
Default Copy multiple worksheet into one colum

I have this code but I get an error about Lastrow

Sub Test2()
Dim sh As Worksheet
Dim DestSh As Worksheet
Dim Last As Long
Dim shLast As Long

With Application
.ScreenUpdating = False
.EnableEvents = False
End With

'Delete the sheet "MergeSheet" if it exist
Application.DisplayAlerts = False
On Error Resume Next
ThisWorkbook.Worksheets("MergeSheet").Delete
On Error GoTo 0
Application.DisplayAlerts = True

'Add a worksheet with the name "MergeSheet"
Set DestSh = ThisWorkbook.Worksheets.Add
DestSh.Name = "MergeSheet"

'loop through all worksheets and copy the data to the DestSh
For Each sh In ThisWorkbook.Worksheets
If sh.Name < DestSh.Name Then
Last = LastRow(DestSh)
shLast = LastRow(sh)

'This example copies everything, if you only want to copy
'values/formats look at the example below the first example
sh.Range(sh.Rows(2), sh.Rows(shLast)).Copy DestSh.Cells(Last + 1,
"A")

End If
Next

Application.Goto DestSh.Cells(1)

With Application
.ScreenUpdating = True
.EnableEvents = True
End With
End Sub




N.F wrote:
I dont know if thats possible without using Visual B.
Are u familiar a little with VBA???

I have multiple worksheets about 51 that has so many different number of rows
in each sheet that I want to copy the first 4 colums and paste them into a

[quoted text clipped - 38 lines]
Plese help.
Thank you.


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
Copy multiple worksheet into one colum sam81 Excel Discussion (Misc queries) 6 July 12th 07 02:03 AM
copy a formula down the colum and advance it by row only ShoDan Excel Worksheet Functions 4 February 15th 07 05:56 PM
how do I copy multiple column widths from a worksheet in one work. Lockport Excel Discussion (Misc queries) 2 August 2nd 06 09:40 PM
how i can copy colum and pest it in row? Jam Excel Discussion (Misc queries) 1 May 7th 06 09:30 AM
How do I edit a worksheet and copy to multiple files? artex Excel Discussion (Misc queries) 0 August 31st 05 11:08 PM


All times are GMT +1. The time now is 01:52 PM.

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"