|
[广告] Excel易用宝 - 提升Excel的操作效率 · Excel / WPS表格插件 ★ 免费下载 ★ ★ 使用帮助★
Sub shishi()
Set dic = CreateObject("scripting.dictionary")
arr = Sheet1.UsedRange
With Sheets("删除内容")
rn = .Cells(Rows.Count, 2).End(xlUp).Row
brr = .Range("b2:b" & rn)
End With
For i = 1 To UBound(arr)
dic(arr(i, 1)) = Application.Index(arr, i)
Next
For Each Key In dic.keys
For j = 1 To UBound(brr)
If InStr(dic(Key)(3), brr(j, 1)) <> Empty Then
dic.Remove (Key)
GoTo x
End If
Next
x:
Next
Sheet1.UsedRange.ClearContents
Sheet1.Range("a1").Resize(dic.Count, UBound(arr, 2)) = WorksheetFunction.Transpose(WorksheetFunction.Transpose(dic.items))
End Sub
|
评分
-
1
查看全部评分
-
|