Every fifth count

  • Thread starter Thread starter John
  • Start date Start date
J

John

Hi

I have a counter that counts 1,2,3 and onwards. How can I find when counter
is at a multiple of 5 ie 5 or 10 or 15 etc?

Thanks

Regards
 
Just to expand on Allen's answer (it is the best answer)
the mod will basicly return the remainder after a divisioin.

So in this case, 15 mod 5 would return 0 as there are no remainders,
but a 12 mod 5 would return 2 as there are 2.

Testing for a value of 0 will indicate whether it is a multiple of 5
or not.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Trouble with VBA loop 5
Unread e-mail count in Samsung Oreo update 3
Count(*) 1
Row Count... 4
Number Format 2
Counting days using option group 10
Visual days count on screen controlled by option group 4
Autocounter 27

Back
Top