工作表"input"想copy 欄 B :I黃色highlight的資料 -------到工作表"update" 相對應 欄 O :S的位置 平時是用vookup可以,可否用marco 簡化
請大大指點.作者: 准提部林 時間: 2019-3-8 11:08
先試:
Sub TEST()
Dim xR As Range, xF As Range, j%, Cr
Cr = Array(2, 4, 5, 6, 7)
Application.ScreenUpdating = False
For Each xR In Range([input!B5], [input!B65536].End(xlUp))
If xR = "" Or xR.Row < 5 Then GoTo 101
Set xF = [update!B:B].Find(xR, Lookat:=xlWhole)
If xR Is Nothing Then GoTo 101
For j = 1 To 5
xF(1, 13 + j) = xR(1, Cr(j - 1))
Next j
101: Next
End Sub