excel training program - do loop
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 program - Do Loop

excel training program - Do Loop

resolvedResolved · Low Priority · Version Standard

replyReply Fri 14 Dec 2007, 16:11Delegate Kitu said...

Kitu has attended:
Excel VBA Intro Intermediate course

Do Loop

What is the difference between the For and Do loops?

For upcoming training course dates see: Pricing & availability

replyReply Thu 3 Jan 2008, 16:55Trainer Stephen said...

RE: Do Loop

Hi Kitu

Thankyou for your question

All loops carry out a series of operations until a condition is met

A For Loop will execute for a predetermined number of loops.

For i = 1 to 100

CODE

Next i

This Will carry out the code will the variable i is less than or equal to 100. i will increase by 1 at every loop, so the code will be run for 100 loops

A DO Loop will typically compare one variable with another variable or a constant and execute the code while a specified condition holds

Do until A > B

CODE

Loop

This will execute the code as long as the variable A is less than the variable B

 

Excel tip:

The dual nature of toolbar buttons

Many toolbar buttons are dual purpose, though the two purposes are often linked in some way. For example, Align Left aligns a cell's contents to the left of the cell. However, hold down Shift and press the Align Left button: Excel aligns the cell contents to the right.
You may respond: So what? Well, you can reduce the number of buttons on your toolbar to make your screen less cluttered and allow more room for, perhaps, some of your own commands. After all, what's the point of an Align Right button when Shift+Align Left does the same thing?

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