Thread: Count
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
JE McGimpsey JE McGimpsey is offline
external usenet poster
 
Posts: 4,624
Default Count

One way:

Dim i As Long
For i = 0 to 100
If (i = 10) or (i = 25) Then
'Do special stuff
End If
'Do normal stuff
Next i


In article ,
wrote:

Hello,

I would like to make my macro perform an operation every
25th and 10th time it passes through a Do Loop and/or a
For Next Loop.

I am familiar with setting the variable to 0 before the
loop then + 1 everytime through, but how can I have it do
something else every 10th time through.