|
Sub 提科目代码()
Set d = CreateObject("Scripting.Dictionary")
d.CompareMode = 1
arr = Sheets("年初").Range("A1").CurrentRegion
For i = 2 To UBound(arr) '
d(arr(i, 1)) = arr(i, 2)
Next
brr = Sheets("汇总").Range("A1").CurrentRegion
For i = 3 To UBound(brr)
For j = 2 To UBound(brr, 2) Step 4
If d.Exists(brr(i, 1)) Then brr(i, j) = d(brr(i, 1))
Next
Next
With Sheets("汇总")
.Range("A1").Resize(UBound(brr), UBound(brr, 2)) = brr
Union(.Columns(2), .Columns(6), .Columns(10), .Columns(14), .Columns(18)).NumberFormat = "@"
End With
End Sub |
评分
-
2
查看全部评分
-
|