M MEDolin Registered User. Local time Today, 19:11 Joined Nov 6, 2001 Messages 17 Dec 12, 2001 #1 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.
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.
PearlGI Registered User. Local time Today, 19:11 Joined Aug 30, 2001 Messages 125 Dec 12, 2001 #2 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
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