|
Sub lll()
Dim sht As Worksheet
Dim i As Integer
Dim k As Integer
Range("a4:f497").ClearContents
Range("r4:w497").ClearContents
For Each sht In Sheets
If sht.Name <> "汇总" Then
i = sht.Cells(Rows.Count, 5).End(xlUp).Row
For k = 4 To i
If sht.Cells(k, 5) = "在职" Then
h = h + 1
Sheets("汇总").Cells(3 + h, 1) = h
Sheets("汇总").Cells(3 + h, 2) = sht.Cells(k, 2)
Sheets("汇总").Cells(3 + h, 3) = sht.Cells(k, 3)
Sheets("汇总").Cells(3 + h, 4) = sht.Cells(k, 4)
Sheets("汇总").Cells(3 + h, 5) = sht.Cells(k, 5)
Sheets("汇总").Cells(3 + h, 6) = sht.Cells(k, 6)
Sheets("汇总").Cells(3 + h, "r") = sht.Cells(k, "r")
Sheets("汇总").Cells(3 + h, "s") = sht.Cells(k, "s")
Sheets("汇总").Cells(3 + h, "t") = sht.Cells(k, "t")
Sheets("汇总").Cells(3 + h, "u") = sht.Cells(k, "u")
Sheets("汇总").Cells(3 + h, "v") = sht.Cells(k, "v")
Sheets("汇总").Cells(3 + h, "w") = sht.Cells(k, "w")
Sheets("汇总").Cells(3 + h, "x") = sht.Cells(k, "x")
End If
Next
End If
Next
End Sub
|
|