[RESOLVED] How to check counter for particular numbers
When the counter is 4, 7, 10, 13, 16, 19, 22, etc, etc, etc for as many counts as needed I need to do something slightly different on those particular count values. How do I check for those values without using a bunch of If statements or a Select Case?
Re: How to check counter for particular numbers
Determine the pattern, and create a check based on it.
In this case they seem to be multiples of 3, plus one... so check for that.
Code:
If (x - 1) Mod 3 = 0 Then
'4 etc
Else
'Other numbers
End If
Re: How to check counter for particular numbers
That works and I tried it however it also includes 0 which I can overcome by just checking if number is > 1 but I was just thinking if there is a way without the additional If x > 1 Then
x=1
If (x - 1) Mod 3 = 0 Then
Re: How to check counter for particular numbers
Adding >1 is the easiest way.
Re: How to check counter for particular numbers
Thanks, si. I'll use your code.