Public Schedule Face-to-Face & Online Instructor-Led Training - View dates & book

excel vba

ResolvedVersion 2003

Jane has attended:
Excel VBA Intro Intermediate course

Excel VBA

what is the code to select a range from the anchor point downwards a specified number of rows?

RE: Excel VBA

If you have the number of rows specified as a variable (NumOfRows) then

Range(activecell.address, activecell.offset(NumOfRows,0).address).select

Otherwise if you want to select 6 rows, you need to offset your selection by 5 rows as shown below:

Range(activecell.address, activecell.offset(5,0).address).select


Generally:

Range(activecell.address, activecell.offset(NumOfRows,NumOfColumns).address).select

where NumOfRows and NumOfColumns are the EXTRA rows and columns you want to select IN ADDITION TO the currently selected cell.

 

Training courses

Training information:

Welcome. Please choose your application (eg. Excel) and then post your question.

Our Microsoft Qualified trainers will then respond within 24 hours (working days).

Frequently Asked Questions
What does 'Resolved' mean?

Any suggestions, questions or comments? Please post in the Improve the forum thread.

Excel tip:

The Easiest Way to See a Sum or Average in Excel 2010

Did you know the quickest and most simple way of working out the average or sum of a set of numbers?

Highlight numbers in cells or type some numbers in cells and then look at the status bar at the bottom of the window. Here you will see a display of the average of the numbers, as well as a count of the cells and the sum of these cells.

View all Excel hints and tips

Connect with us:

0207 987 3777

Call for assistance

Request Callback

We will call you back

Server loaded in 0.1 secs.