|
参与一下。。。
- Sub ykcbf2() '//2024.6.7
- Set d = CreateObject("Scripting.Dictionary")
- For Each sht In Sheets
- If InStr(sht.Name, "总表") = 0 Then
- With sht
- r = .Cells(Rows.Count, "AC").End(3).Row
- arr = [ac1].Resize(r, 2)
- End With
- For i = 5 To UBound(arr)
- If arr(i, 1) <> Empty Then
- s = arr(i, 1) & "|" & sht.Name
- d(s) = arr(i, 2)
- End If
- Next
- End If
- Next
- With Sheets("绩效总表")
- r = .Cells(Rows.Count, 2).End(3).Row
- For i = 5 To r
- For j = 6 To 12
- s = .Cells(i, 2) & "|" & .Cells(4, j)
- If d.exists(s) Then
- .Cells(i, j) = d(s)
- End If
- Next
- Next
- d.RemoveAll
- For i = 5 To r
- s = .Cells(i, 2)
- d(s) = .Cells(i, 16)
- Next
- End With
- With Sheets("工资总表")
- r = .Cells(Rows.Count, 2).End(3).Row
- For i = 5 To r
- s = .Cells(i, 2)
- If d.exists(s) Then
- .Cells(i, 9) = d(s)
- Else
- .Cells(i, 9) = ""
- End If
- Next
- End With
- Set d = Nothing
- MsgBox "统计结束"
- End Sub
复制代码
|
评分
-
1
查看全部评分
-
|