|
[广告] Excel易用宝 - 提升Excel的操作效率 · Excel / WPS表格插件 ★ 免费下载 ★ ★ 使用帮助★
做了一个背景颜色更改的,其他的自己试着做
- Sub 查询()
- T = Timer
- [a1].CurrentRegion.Interior.ColorIndex = 0
- Set regx = CreateObject("vbscript.regexp")
- With regx: .Global = False: .Pattern = "昆山": End With
- For Each AR In [a1].CurrentRegion
- Set B = regx.Execute(AR)
- C = C + B.Count
- If B.Count > 0 Then AR.Interior.ColorIndex = 3
- Next
- CreateObject("Wscript.shell").popup " 昆山 记录共计:" & C & "条,一共用时:" & Format(Timer - T, "#0.0000") & "秒", 1, "ainiy提示!", 32
- End Sub
复制代码 |
|