Sub EX()
Dim Arr As Range
Set Arr = Sheets(1).[b1].CurrentRegion
For Each a In Array(2, 3, 4)
With Sheets(a)
For Each b In .Range(.[c2], .[c2].End(4))
For x = 2 To Arr.Rows.Count
If b = Arr(x, 3) And b.Offset(, 1) <> "" Then
Arr(x, 4).Resize(, 4) = b.Offset(, 1).Resize(, 4).Value
GoTo 100
End If
Next
100:
Next
End With
Next
End Sub作者: y54161212 時間: 2020-9-9 20:59