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)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top