'可以试试 Option Explicit Sub test() Dim i, dic Set dic = CreateObject("scripting.dictionary") With Sheets("sheet1") For i = 1 To .[a65536].End(xlUp).Row If Not dic.exists(Trim(.Cells(i, 1))) Then dic.Add Trim(.Cells(i, 1)), 1 Next End With With Sheets("sheet2") For i = .[b65536].End(xlUp).Row To 1 Step -1 If Not dic.exists(Trim(.Cells(i, 2))) Then .Rows(i).Delete Next End With End Sub