第1个回答 2017-01-20
For Each shs In Worksheets
For x = 2 To shs.Cells(Rows.Count, 1).End(3).Row
shs.Cells(x, 10) = shs.Name
Next
Next
Sheets.Add before:=Sheets(1)
Application.DisplayAlerts = False
For y = 2 To Sheets.Count
If y = 2 Then
Sheets(y).Range("A1").CurrentRegion.Copy Sheets("sheet1").Cells(1, 1)
Else
k = Sheets("sheet1").Cells(Rows.Count, 1).End(xlUp).Row + 1
Sheets(y).Range("A1").CurrentRegion.Offset(1, 0).Copy Sheets("sheet1").Cells(k, 1)
End If
Next y