Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Below is code I wrote to select multiple rows creating a single range
Sheets("Givens").Activat Rows("22:22").Selec Range(Selection, Selection.End(xlDown)).Selec To get me the correct range I need a set of instruction to modify the above range by decreasing by one row from the bottom of the selection. My attempt was for the 4th instruction "Range(Selection, Selection.xlUp).Select" but unfortunately for me it's an improper syntax Please help Thank you in advance. |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
One way:
Option Explicit Sub testme01() Dim myRng As Range With Worksheets("Givens") Set myRng = .Range("A22", .Range("a22").End(xlDown).Offset(-1, 0)) End With myRng.entirerow.Select End Sub (With no checking to see if there really was data under A22.) Floss wrote: Below is code I wrote to select multiple rows creating a single range. Sheets("Givens").Activate Rows("22:22").Select Range(Selection, Selection.End(xlDown)).Select To get me the correct range I need a set of instruction to modify the above range by decreasing by one row from the bottom of the selection. My attempt was for the 4th instruction "Range(Selection, Selection.xlUp).Select" but unfortunately for me it's an improper syntax. Please help. Thank you in advance. -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
VBA Code User Range Selection | Excel Discussion (Misc queries) | |||
Sumeif macro with range selection | Excel Discussion (Misc queries) | |||
Macro Range Selection | Excel Discussion (Misc queries) | |||
macro code to get dynamic range | Excel Discussion (Misc queries) | |||
macro code to sort a range | Excel Discussion (Misc queries) |