while loops
Microsoft Office Training verified by visa - mastercard securecode about microsoft training company london ukadd this page to your favourites/bookmarksAdd to favourites
view a printable version of this pagePrintable version
email this page to somebodyEmail this page
Customer: Sign in
Delegate: Sign in
Trainer: Log in

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

While loops

The UK's most regular instructor-led training courses.
Training information: excel-training-advanced courses · Advanced.excel · Microsoft Office VBA training

resolvedResolved · Low Priority · Version 2003

While loops

Sara has attended:
Excel VBA course

by - delegate Sara [1 post] (2008 Aug 26 Tue, 16:24) replyReply

I would like to see some examples of while loops.

Excel VBA 2 day course
Version Date Location Places
available
Book Next place rate:
Card Invoice
2007 2008 Dec 11 Thu + 12 Fri Bayswater 3 book now £525 £545
2007 2009 Jan 8 Thu + 9 Fri Bloomsbury 7 book now £450 £475
2003 2009 Jan 22 Thu + 23 Fri Southwark 4 book now £475 £485
2003 2009 Jan 29 Thu + 30 Fri Bayswater 5 book now £450 £485
2007 2009 Feb 5 Thu + 6 Fri Bloomsbury 7 book now £450 £475
2003 2009 Feb 19 Thu + 20 Fri Southwark 8 book now £275 £399
Full Schedule: See all 33 Excel VBA course dates.
Bookings currently available until 26th November 2009.

RE: while loops

by - trainer Carlos gold contributer[479 posts] (2008 Sep 4 Thu, 11:06) replyReply

Hi Sara

Sorry for the delay in answering this question.

In VBA the While statement is used together with the Do…Loop structure which controls the repetitive execution of the code based upon a test of a condition.

The Do While structure executes the code as long as the condition is true. For example

Do While ActiveCell.Value <> “”
ActiveCell.Value = ActiveCell.Value *1.25
ActiveCell.Offset(1).Select
Loop

To perform the statement block at least once, use the following:

Do
Count = Count +1
Loop While Count <= NoStudents

Hope this helps

Carlos


Related articles

· Training Budgets In A Bad Economy
· Microsoft Excel Training: Not Just for Newbies Anymore
· Excel and Inventory Management
· Basic Excel Training
· An Introduction to Microsoft Excel: Top Features for the Excel Novice

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

Excel tip:

Conditional formatting for cells that return text , not picked up by Go to command

If you have tried to format all cells containing text even those that display text as a result of a formula you may have had difficulty. As Go to command with constant selected does not pick up formulas that result in text.

Then try this. Select the range the formula cells appear in on your sheet. Format, select Conditional Formatting menu. In the dialog box under Condition 1, select "Formula Is" from drop down. Next to it in the Formula Box, enter the formula =Istext(A1. Click Format button , choose desired formatting settings and click OK. To go ahead and apply the conditional formatting click OK to accept

View all Excel hints and tips

Rate this page:
4.0/5 (3 votes cast)
Institute of IT Training - Accredited Training Provider Microsoft Certified Partner
microsoft office
Microsoft Office Specialist Authorised Testing Centre (MOS and MCAS)

Prodigy Platinum Learning Partner

Institute of IT Training - Accredited Training Provider Association of Computer Trainers Valid HTML 4.01 Transitional
Valid CSS Markup

secure online payments - visa - mastercard

Mini sitemap. These are the main areas of our web site. Full sitemap.

Training by application Main information pages See also

Access courses
DreamWeaver courses
Excel courses
MS Project courses
Outlook courses
PowerPoint courses
VBA courses
Word courses
(more...)

Public scheduled courses
On-site training
Closed company courses

Microsoft Office training
Pricing and availability
Training schedule
Training venues

Access training
Dreamweaver training
Excel training
MS Project training
PowerPoint training

London Computer Training
Computer Training London

Microsoft Access training
Microsoft Excel training
Microsoft Project training
Microsoft Outlook training
Microsoft Powerpoint training
Microsoft Word training

Time Management Course London

Interested in Access training? Please see the following pages:
microsoft access courses · microsoft training access course
microsoft+access+training · access courses in london

Training Information

Training Articles

AddThis Social Bookmark Button What's this?
Add to Del.icio.us Add to Facebook Add to Digg Add to Reddit Add to Google Add to Yahoo Add to Diigo Add to Mr. Wong Add to Linkarena Add to Power Oldie Add to Folkd Add to Jumptags Add to Upchuckr Add to Simpy Add to StumbleUpon Add to Slashdot Add to Netscape Add to Furl Add to Spurl Add to Blinklist Add to Blogmarks Add to Technorati Add to Newsvine Add to Blinkbits Add to Ma.Gnolia Add to Smarking Add to Netvouz