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

excel training program - do loop

Forum home » Delegate support and help forum » Microsoft Excel Training and help » excel training program - Do Loop

excel training program - Do Loop

ResolvedVersion Standard

Kitu has attended:
Excel VBA Intro Intermediate course

Do Loop

What is the difference between the For and Do loops?

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

 

Training courses

Training information:

See also:

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:

Use Paint Brush to Format More than one Cell

To copy a format to many cells or ranges

1. Select the cell with the format that you want to copy

2. Double-click on the paint brush

When you move to the cell where you want to paste the format you will notice that a paint brush follows the cursor.

Paste the format to all the cells or ranges you need to format.

When finished go back to the paint brush on the tool bar and single click on it to deactivate the function.

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.