Set s = Sheets("ID")
r = s.Cells(s.Rows.Count, "B").End(3).Row - 1
ar = s.Cells(2, 1).Resize(r, 2)
For Each Z In Sheets
If Z.Name Like "*Leg*" Then
Zr = Z.Cells(Rows.Count, "B").End(3).Row
For i = 2 To Zr
Z.Cells(i, 3) = ar(Z.Cells(i, 2), 2)
Next
End If
Next
End Sub作者: mrcv3 時間: 2023-9-1 10:58