Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Gallant
 
Posts: n/a
Default How to select and deselect rows in Excel

I have to Question regarding selecting and deselecting rows,columns,... in
Excel.

1-When some row or cells are selected how we can we just deselect one row
or cell or column?We usually do it by keeping the Ctrl key in other office
program.

2-Is there any way that we can use to select raws or columns one in
between?It could be very useful.

Regards

Gallant
  #3   Report Post  
Gord Dibben
 
Posts: n/a
Default

Gallant

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 Sun, 3 Jul 2005 03:55:01 -0700, "Gallant"
wrote:

I have to Question regarding selecting and deselecting rows,columns,... in
Excel.

1-When some row or cells are selected how we can we just deselect one row
or cell or column?We usually do it by keeping the Ctrl key in other office
program.

2-Is there any way that we can use to select raws or columns one in
between?It could be very useful.

Regards

Gallant


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Protection of check boxes in excel 2002 Newbeetle Excel Discussion (Misc queries) 2 March 14th 05 12:59 PM
Subtotals in Excel 2003 for doc exported from Sharepoint list Holly OK Excel Discussion (Misc queries) 11 March 2nd 05 10:25 PM
Deselect one of many non-adjacent rows selected Nicolle K. Excel Discussion (Misc queries) 1 January 11th 05 06:24 PM


All times are GMT +1. The time now is 04:03 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"