新闻中心

相同单元格自动变色提醒

相同单元格自动变色提醒

Private Sub Worksheet_SelectionChange(ByVal T As Range)

Dim Rg As Range,相同醒 SumRg As Range

If T.Value = "" Then Exit Sub

Set Rg = Range("A1").CurrentRegion.Find(T, Lookat:=xlWhole)

MyAddress = Rg.Address

Do

Set Rg = Range("A1").CurrentRegion.FindNext(Rg)

k = k + 1

If k = 1 Then

Set SumRg = Rg

Else

Set SumRg = Application.Union(SumRg, Rg)

End If

Loop While Rg.Address <> MyAddress

Application.EnableEvents = False

SumRg.Select

Range("A1").CurrentRegion.Interior.ColorIndex = xlNone

SumRg.Interior.ColorIndex = 6

Application.EnableEvents = True

End Sub

上一篇:魔兽世界怀旧服安其拉猫德毕业装备掉落一览 下一篇:适用宝马3系车门内拉手F35 F30 316 320 328门把手内侧4系内扶手

Copyright © 2024 呼和浩特市某某自动化科技有限责任公司 版权所有   网站地图