excel+training+london - 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 Training and help » excel+training+london - Excel VBA

excel+training+london - Excel VBA

resolvedResolved · Low Priority · Version Standard

replyReply Fri 16 Nov 2007, 16:39Delegate Alex said...

Alex has attended:
Excel VBA Intro Intermediate course

Excel VBA

What is the line of code to select the range from cell A1 in the active work sheet to the last cell in the range (assume I would have assigned a variable to this last cell)? Hope that makes sense..

For upcoming training course dates see: Pricing & availability

replyReply Wed 21 Nov 2007, 12:22Trainer Carlos said...

RE: Excel VBA

Alex

Youo need to set a variable to hold the defined range. Then you need to set the range as below.

NB The first "A1" sets the start, the second "A1" states that the range to select is only the A column.


Sub SelectRange()

Dim MyRange As Range

Set MyRange = Range("A1", Range("A1").End(xlDown))

MyRange.Select

End Sub


Hope this helps

Carlos

 

Excel tip:

Highlighting only Text cells

To select onlt text value cells in a spreadsheet, click on Edit-Go to(F5)


In the Go To dialog box, click Special.
In the Go To Special dialog box, select Constants.
Click OK.

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