更换工作表Sheet1 & Sheet2中与源和表( “工作表Sheet1”)&表( “Sheet2的”)
Application.ScreenUpdating = False
Sheets("Sheet1").Range("A3:C" & Sheets("Sheet1").Range("A50000").End(xlUp).Row).Sort Key1:=Sheets("Sheet1").Range("B3"), Order1:=xlDescending
Sheets("Sheet1").Range("A1:C" & Sheets("Sheet1").Range("A50000").End(xlUp).Row).Copy Destination:=Sheets("Sheet2").Range("A1")
Sheets("Sheet2").Range("A3:C" & Sheets("Sheet2").Range("A50000").End(xlUp).Row).RemoveDuplicates Columns:=1, Header:=xlNo
Sheets("Sheet2").Range("A3:C" & Sheets("Sheet2").Range("A50000").End(xlUp).Row).Sort Key1:=Sheets("Sheet2").Range("A3"), Order1:=xlAscending
Application.ScreenUpdating = True
使用数据透视表 –