RESIZE USEDRANGE

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Please help.

I want to select the used range with the first 1 row not to select.
If I use the Offset to select :-
Selection.Offset(1,0).Select
The range will be down 1 row and an empty row after the last used row will
also be selected
If I use the resize:-
Selection.Resize(numRows -1, numColumns).Select
The last used row will be deselected.

What exactly should I write ?

Thanks in advance
 
Hi ak,

You are close:

Dim numRows As Integer
Dim numColumns As Integer
numRows = Selection.Rows.Count
numColumns = Selection.Columns.Count
Selection.Offset(1, 0).Resize(numRows - 1, numColumns).Select

HTH

Executor
 

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