offset rows

  • Thread starter Thread starter Alberto Ast
  • Start date Start date
A

Alberto Ast

I have selected row 7 and now I want to grow my selection to a variable
number of rows.... how do I do it.
 
Use Resize, not Offset...

Rows(7).Select
HowManyRows = InputBox("How many rows total did you want to select?")
Selection.Resize(HowManyRows).Select
 
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)
 
Back
Top