View Single Post
  #4   Report Post  
Paul B
 
Posts: n/a
Default

Octavio, not that I am aware of,

To put in this macro, from your workbook right-click the workbook's icon and
pick View Code. This icon is to the left of the "File" menu this will open
the VBA editor, in the left hand window click on your workbook name, go to
insert, module, and paste the code in the window that opens on the right
hand side, press Alt and Q to close this window and go back to your workbook
and press alt and F8, this will bring up a box to pick the Macro from, click
on the Macro name to run it. If you are using excel 2000 or newer you may
have to change the macro security settings to get the macro to run. To
change the security settings go to tools, macro, security, security level
and set it to medium.


You may also what to have a look here on getting started with macros
http://www.mvps.org/dmcritchie/excel/getstarted.htm


--
Paul B
Always backup your data before trying something new
Please post any response to the newsgroups so others can benefit from it
Feedback on answers is always appreciated!
Using Excel 2002 & 2003

"Octavio" wrote in message
...
This seems very sophisticated and complicated for novices. Dones not

excell
has a tool or a built in command to do this?


"Paul B" wrote in message
...
Octavio, here is a post by Chip Pearson on the subject,

I long ago got tired of the situation you describe, and wrote two
procedures to deal with it. The first, UnSelectActiveCell removes
the active cell from the selection. The second, UnSelectActiveArea,
removes an entire area from the selection. Attach these procedures
to your right-click menu and you'll be all set.


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(ActiveCe*ll, 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
'-----------------------------*--


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


--
Paul B
Always backup your data before trying something new
Please post any response to the newsgroups so others can benefit from it
Feedback on answers is always appreciated!
Using Excel 2002 & 2003

"Octavio" wrote in message
...
Once you select a group of cells, how do you deselect from that
previously
selected group one cell or a few unwanted cells without deselecting the

rest
of the group?