Sub GopDuLieuCuaCacTrangTinh()
Dim Sh As Worksheet, Rng As Range
Sheet1.Select
[B2].CurrentRegion.Offset(2).ClearContents
For Each Sh In ThisWorkbook.Worksheets
If Sh.Name <> "Sheet1" Then
Set Rng = Sh.[B2].CurrentRegion.Offset(2)
Rng.Copy Destination:=[A65500].End(xlUp).Offset(1)
Else
MsgBox Sh.Name
End If
Next Sh
End Sub
cảm đơn anhBạn chay macro này xem kết quả có như bạn mong không nha:
PHP:Sub GopDuLieuCuaCacTrangTinh() Dim Sh As Worksheet, Rng As Range Sheet1.Select [B2].CurrentRegion.Offset(2).ClearContents For Each Sh In ThisWorkbook.Worksheets If Sh.Name <> "Sheet1" Then Set Rng = Sh.[B2].CurrentRegion.Offset(2) Rng.Copy Destination:=[A65500].End(xlUp).Offset(1) Else MsgBox Sh.Name End If Next Sh End Sub