Thread: macros
View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.misc
Mike H Mike H is offline
external usenet poster
 
Posts: 11,501
Default macros

Hi,

This method of addressing worksheets uses the sheet(n) method where sheet(1)
is the leftmost sheet. This macro now copies the range A1 - H1 for every
sheet to the first worksheets.

It copies the information into the first empty row.

Sub Stantial()
lastrow = Sheets(1).Cells(Cells.Rows.Count, "A").End(xlUp).Row
For x = 2 To Worksheets.Count
Sheets(x).Range("A1:H1").Copy Destination:=Sheets(1).Range("A" & lastrow + 1)
lastrow = lastrow + 1
Next
End Sub


Mike


"kilo" wrote:

Thanks mike,

but this i need to paste the information copied from different sheets unto
one single sheet. lets say if i copy from sheet8, i need to paste unto sheet
1, copy sheet 9, paste on a different cell in sheet 1 etc. could you help.

"Mike H" wrote:

Hi,

This will copy A1 - A10 to H1 - H10 in every worksheet

Sub Stantial()
For x = 1 To Worksheets.Count
Sheets(x).Range("A1:A10").Copy Destination:=Sheets(x).Range("H1")
Next
End Sub

Mike

"kilo" wrote:

I want to copy excel information from same cells in different sheets and
paste unto the same sheet , how can I use macro or anything else to do this
without repeating the process for the many sheets I have. thanks