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
| Argument | What to give it |
|---|---|
| number | The number to divide. A blank gives a blank. |
| divisor | The 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 want | Use |
|---|---|
| How many whole times it goes in | ROUNDDOWN of the division |
| The day of the week of a date | WEEKDAY |
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).
=MOD([Duration], 5)
