如何取消select使用键盘Excel行

当一个Excel行被选中,我们按CTRL +单击它,该行不被取消select。 有没有办法使用键盘取消select一个特定的行?

对不起,这是不可能的。

我所能做的就是直接到Chip Pearson的网站,该网站有可以取消select细胞/区域的macros

这里也提供代码:

UnSelectActiveCell

此过程将从select中删除活动单元格。

Sub UnSelectActiveCell() Dim R As Range Dim RR As Range For Each R In Selection.Cells If StrComp(R.Address, ActiveCell.Address, vbBinaryCompare) <> 0 Then If RR Is Nothing Then Set RR = R Else Set RR = Application.Union(RR, R) End If End If Next R If Not RR Is Nothing Then RR.Select End If End Sub 

UnSelectCurrentArea

此过程将从选区中移除包含活动单元的区域。

 Sub UnSelectCurrentArea() Dim Area As Range Dim RR As Range For Each Area In Selection.Areas If Application.Intersect(Area, ActiveCell) Is Nothing Then If RR Is Nothing Then Set RR = Area Else Set RR = Application.Union(RR, Area) End If End If Next Area If Not RR Is Nothing Then RR.Select End If End Sub