excel反选已选定若干单元格中的1个单元格,高手请进。
发布网友
发布时间:2022-04-30 15:02
我来回答
共3个回答
热心网友
时间:2022-06-25 21:12
常规方法中肯定没有数据区域内的反应。不过VBA方法是可以做的
以下VBA代码可以实现数据区内单元格的反选:
Sub invert()
Application.DisplayAlerts = False
Application.ScreenUpdating = False
Dim raddress As String, taddress As String
raddress = Selection.Address
taddress = ActiveSheet.UsedRange.Address
With Sheets.Add
.Range(taddress) = 0
.Range(raddress) = "=0"
raddress = .Range(taddress).SpecialCells(xlCellTypeConstants, 1).Address
.Delete
End With
ActiveSheet.Range(raddress).Select
Application.ScreenUpdating = True
End Sub
热心网友
时间:2022-06-25 21:12
再点一次选错的单元格就OK了,要按CTRL键
热心网友
时间:2022-06-25 21:13
按住CTRL不放,点选错的