Deselect Cells while using ctrl

G

Guest

I discovered you can use the ctrl key to select non-adjacent cells. Is there
a way to deselect certain cells? Sometimes if I am selecting many cells I
might select an extra row on accident. In which case I need to start over
selecting the cells. Also if I select a range of cells (for instance, A1:G9)
can I deselect certain cells? For instance A1:G9 except A3,B7, and F9. I
know this seems like a silly question, but I would just like to know if there
is an answer to this.
 
H

Henry

Sloth,

Holding down Ctrl and clicking on a cell will toggle select/deselect.
Clicking on a selected cell whilst holding down Ctrl will deselect it.

Henry
 
D

Dave O

To use your example, highlight A1:G9. Then press the CTRL button and
click A3, B7, etc., which will deselect those cells. If you're using
the CTRL key to select non-adjacent cells and you accidentally click a
cell you didn't intend to click, click it again (still pressing CTRL)
to deselect.
 
B

Bob Umlas

The answers you've gotten to deselect are simply not true. There's really no
EASY way to do this witihout either using ASAP Utilities, perhaps some other
utility, or, once you've made a mistake, you can stop at that point and give
your range a name (type a temporary name like "x" in the name box), then
using insert/name/define, edit the "bad" cell out of the name "x", then use
Edit/goto x and continue with what you were doing!

Bob Umlas
Excel MVP
 
G

Gord Dibben

Following up on Bob's suggestion..........

I have added right-click menu items assigned to these two macros from Chip
Pearson.

If you want to use them, post back and I can show how to add them to the
right-click menu or you could just add them to a couple of buttons on your
Toolbar.

Sub UnSelectActiveCell()
Dim Rng As Range
Dim FullRange As Range
If Selection.Cells.Count > 1 Then
For Each Rng In Selection.Cells
If Rng.Address <> ActiveCell.Address Then
If FullRange Is Nothing Then
Set FullRange = Rng
Else
Set FullRange = Application.Union(FullRange, Rng)
End If
End If
Next Rng

If FullRange.Cells.Count > 0 Then
FullRange.Select
End If
End If
End Sub

Sub UnSelectActiveArea()
Dim Rng As Range
Dim FullRange As Range
Dim Ndx As Integer
If Selection.Areas.Count > 1 Then
For Each Rng In Selection.Areas
If Application.Intersect(ActiveCell, Rng) Is Nothing Then
If FullRange Is Nothing Then
Set FullRange = Rng
Else
Set FullRange = Application.Union(FullRange, Rng)
End If
End If
Next Rng
FullRange.Select
End If
End Sub


Gord Dibben Excel MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top