Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
offset rows
I have selected row 7 and now I want to grow my selection to a variable
number of rows.... how do I do it. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
offset rows
Use Resize, not Offset...
Rows(7).Select HowManyRows = InputBox("How many rows total did you want to select?") Selection.Resize(HowManyRows).Select -- Rick (MVP - Excel) "Alberto Ast" wrote in message ... I have selected row 7 and now I want to grow my selection to a variable number of rows.... how do I do it. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
offset rows
Use,
Dim N As Long N = 10 Selection.Resize(N).Select This will resize the selection to N rows with the same number of columns as the were in the original selection. It assumes N 0. Cordially, Chip Pearson Microsoft Most Valuable Professional Excel Product Group, 1998 - 2010 Pearson Software Consulting, LLC www.cpearson.com (email on web site) On Sat, 17 Oct 2009 12:38:01 -0700, Alberto Ast wrote: I have selected row 7 and now I want to grow my selection to a variable number of rows.... how do I do it. |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
offset rows
Dim myRange as Range
Set myRange = Selection.resize(7,1) 'as an example "Alberto Ast" wrote: I have selected row 7 and now I want to grow my selection to a variable number of rows.... how do I do it. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
copy offset rows | Excel Discussion (Misc queries) | |||
Offset function gives different answer in columns v Rows | Excel Worksheet Functions | |||
after a .Find command, offset the output 2 rows down. | Excel Programming | |||
Offset every # of Rows | Excel Worksheet Functions | |||
offset every other row down a column (2 merged rows) | Excel Programming |