How to copy data to the First sheet using VBA in Excel



How to copy data to the First sheet using VBA in Excel
copy data from all other sheets to your first sheet. Find the first blank row on a sheet. Copy data to the first blank row.

Sub copydata()

‘ copydata Macro

Dim wsheet As Worksheet
Dim lastrow As Long

For Each wsheet In ThisWorkbook.Sheets
If wsheet.Name = “sheet1” Then
GoTo ende
Else
lastrow = Sheet1.Cells(Rows.Count, 1).End(xlUp).Row

Sheets(wsheet.Name).Range(“A1:B13”).Copy Destination:=Sheets(“sheet1”).Cells(lastrow, 1)

End If
ende:
Next


End Sub

For more help visit my website

I am able to provide online help on your computer for a reasonable rate.

MY videos are all created on Camtasia.

Follow me on Facebook

Watch more new videos about Excel Office | Synthesized by Mindovermetal English

Rate this post

Bài viết liên quan

Theo dõi
Thông báo của
guest
0 Comments
Phản hồi nội tuyến
Xem tất cả bình luận