MOD

MOD(number, divisor)

The remainder after dividing one number by another, such as the days a duration runs past its last whole week. As in Excel, the remainder takes the divisor's sign, so MOD(-1, 4) is 3. It takes plain numbers only, so a duration is counted in days or hours first with INDAYS or INHOURS.

Arguments

ArgumentWhat to give it
numberThe number to divide. A blank gives a blank.
divisorThe number to divide by. A divisor of 0 is an error on that row.

Examples

Formula
=MOD(INDAYS([Duration]), 5)

The days of the task left over after its whole five-day weeks.

Formula
=MOD(WEEKNUM([Start date]), 2)

0 or 1 by the week the task starts in: alternate weeks, for a two-week rotation.

Formula
=MOD(YEAR([Finish date]), 4)

0 when the task finishes in a year divisible by four.

Reach for something else when

You wantUse
How many whole times it goes inROUNDDOWN of the division
The day of the week of a dateWEEKDAY

Common questions

What does "MOD needs numbers" mean?

One of the arguments is a duration, a date or text. Count a duration in working days first: MOD(INDAYS([Duration]), 5), not MOD([Duration], 5).

The editor refuses this
=MOD([Duration], 5)