Home |
Search |
Today's Posts |
#1
|
|||
|
|||
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
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Protection of check boxes in excel 2002 | Excel Discussion (Misc queries) | |||
Subtotals in Excel 2003 for doc exported from Sharepoint list | Excel Discussion (Misc queries) | |||
Deselect one of many non-adjacent rows selected | Excel Discussion (Misc queries) |