• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Help in macro

Amit629

New Member
Hi,
im trying this code but its not work please help.


Code:
Sub am()
 
    Dim ws As Worksheets
 
       
      For Each ws In Workbooks("zz.xlsx").Worksheets
     
             
        ws.Range("A1:y" & ws.Range("A" & Rows.Count).End(xlUp).Row).Copy _
            Destination:=summarry.Range("A" & Rows.Count).End(xlUp).Offset(1)
 
    Next ws
 
End Sub
 
Hi Amit ,

Try this :
Code:
Sub am()
    Dim ws As Worksheet
     
    For Each ws In Workbooks("zz.xlsx").Worksheets
        ws.Range("A1:y" & ws.Range("A" & Rows.Count).End(xlUp).Row).Copy _
          Destination:=Workbooks("zz.xlsx").Worksheets("summarry").Range("A" & Rows.Count).End(xlUp).Offset(1)
    Next ws
End Sub
Narayan
 
Thank you so much Narayan its working.
but need some help in this code,when data copied in summarry sheet its start from cell a2 can we copy data form a1.
 
Back
Top