Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default loop a specific number of occurrences

Typically, one would use a For loop, not a Do loop, in this
circumstance. E.g.,

Dim N As Long
For N = 1 To 10
' do something
Next N

However, if you do want a Do loop, use

N = 0
Do Until N = 10
' do something
N = N + 1
Loop

Cordially,
Chip Pearson
Microsoft Most Valuable Professional
Excel Product Group, 1998 - 2009
Pearson Software Consulting, LLC
www.cpearson.com
(email on web site)


On Fri, 14 Aug 2009 11:02:03 -0700, paularo
wrote:

How do I get a "do loop" to run a specific number of times then stop?

Thanks.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Counting the number of occurrences... Zakhary Excel Worksheet Functions 2 May 3rd 09 07:36 PM
Loop a specific number of times andy Excel Programming 2 March 27th 09 06:58 PM
Counting occurrences of specific month bpoland58 Excel Discussion (Misc queries) 2 December 13th 07 05:46 PM
Counting number of occurrences. a.riva@UCL Excel Worksheet Functions 1 October 28th 07 03:44 AM
Count number of occurrences MarkM Excel Discussion (Misc queries) 1 July 27th 06 10:14 PM


All times are GMT +1. The time now is 03:29 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"