|
[广告] Excel易用宝 - 提升Excel的操作效率 · Excel / WPS表格插件 ★ 免费下载 ★ ★ 使用帮助★
- Sub qs()
- Dim arr, i, dic
- Set dic = CreateObject("scripting.dictionary")
- arr = Sheet1.Range("a1").CurrentRegion.Value
- For i = 2 To UBound(arr)
- For c = 1 To UBound(arr, 2)
- s = arr(i, c)
- If s <> Empty Then
- If Not dic.exists(s) Then
- dic(s) = 1
- Else
- dic(s) = dic(s) + 1
- End If
- End If
- Next
- Next
- For i = 2 To UBound(arr)
- s = arr(i, 1)
- If dic(arr(i, 1)) = 1 Then
- Sheet1.Rows(i).Hidden = True
- End If
- Next
- End Sub
- Sub 取消筛选()
- Sheet1.Rows("1:200").Hidden = False
- End Sub
复制代码 |
|