Loop

MEDolin

Registered User.
Local time
Today, 19:11
Joined
Nov 6, 2001
Messages
17
I have an outer loop the runs 1200 times. After each year (12) loops I need to run additonal code reseting certain vaules. Example after 12, 24, 26, 48, 60, etc. Is there a may to determine the loop without ading each value.
 
The following loop would work:

For x = 1 To 1200
IF x MOD 12 = 0 THEN
{Do Something Different}
EndIF
Next x

The MOD function returns the remainder of x divided by 12, therefore if x is divisible by 12 the remainder equals zero.

HTH
wink.gif
 

Users who are viewing this thread

Back
Top Bottom