Reputation: 115
I would like for excel to loop back to 0 when going over the number 30, but also continue counting.
so for example: If i have the number 11 and 25, and i make a sum of it, i would like it to display 6 and not 36.
How would i do it using a formula and not a macro?
Upvotes: 0
Views: 313
Reputation: 152505
Use MOD to return the remainder:
=MOD((25+11)-1,30)+1
The above formula will return 30
for something like 11
and 19
if that is not wanted and infact it goes 28,29,0
then remove the -1
and +1
:
=MOD(11+25,30)
Upvotes: 1