Moonbeam111
Board Regular
- Joined
- Sep 24, 2018
- Messages
- 96
- Office Version
- 365
- 2010
I have a range with a number in it. I would like for it to alert me every time it reaches 100 more.
For example, if my number is 263, then trigger a messagebox saying when I've reached 300 or more. But only trigger once.
What can I do to get this to work?
Im using this code currently. Which partly works.
But it only triggers if the number is exactly divisible by 100. I would like it so it triggers if it reaches the next 100th number without being restricted to exactly the 100th number. I also cant get a way to make it not trigger again if I go under the 100th number and go back up again. I'd like it to be a one time trigger.
For example, if my number is 263, then trigger a messagebox saying when I've reached 300 or more. But only trigger once.
What can I do to get this to work?
Im using this code currently. Which partly works.
VBA Code:
If Range("M2") Mod 100 = 0 Then
msgbox "You have triggered the next 100th number"
End If
But it only triggers if the number is exactly divisible by 100. I would like it so it triggers if it reaches the next 100th number without being restricted to exactly the 100th number. I also cant get a way to make it not trigger again if I go under the 100th number and go back up again. I'd like it to be a one time trigger.