View Single Post
  #6   Report Post  
Gord Dibben
 
Posts: n/a
Default

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

On Thu, 14 Jul 2005 16:08:39 -0400, "Bob Umlas"
wrote:

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

"Sloth" wrote in message
...
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.