excel vba
The UK's Number 1 for Microsoft Office Training Add this page to your favourites/bookmarksBookmark page
 
View printable version of pagePrintable version
Plus One Google
Customer: Sign in
Delegate: Sign in
Trainer: Log in

Forum home » Delegate support and help forum » Microsoft Excel VBA Training and help » Excel VBA

Excel VBA

resolvedResolved · Low Priority · Version 2003

replyReply Thu 3 Jul 2008, 16:39Delegate Jane said...

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?

For upcoming training course dates see: Pricing & availability

replyReply Mon 4 Aug 2008, 12:59Delegate Colin said...

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.

 

Please browse our web site to find out more about
application development excel and other Microsoft training courses.

Excel tip:

Bring up formatting dialog box

Ctrl+1

View all Excel hints and tips


Microsoft Certified Partner Accredited Training Provider: Institute of IT Training Institute of Leadership and Management - Certified Courses Security Seal verified by visa, mastercard securecard