For I = 1 To ROW1
f1 = Worksheets(2).Cells(I, "A").Value
Range("B1").Select
On Error Resume Next '忽略錯誤繼續執行 VBA 代碼,避免出現錯誤信息
'搜尋字串========================================================================
Cells.Find(What:=f1, After:=ActiveCell, LookIn:=xlFormulas, LookAt:= _
xlWhole, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:=False _
, MatchByte:=False, SearchFormat:=False).Activate
Worksheets(2).Cells(I, "B").Value = ActiveCell.Value
If Worksheets(2).Cells(I, "B").Value = "" Then
Worksheets(2).Range("A" & I).Interior.Color = RGB(128, 0, 128)
End If
Next
Sheets(2).Select
Range("B1:B" & ROW1).ClearContents