How to find who is on duty for a date in a rotation in Excel
Formula (Excel and Google Sheets)
=INDEX(A2:A5,MOD(INT((G1-E1)/7),ROWS(A2:A5))+1)Count whole weeks since the rotation started and wrap around the list: =INDEX(A2:A5,MOD(INT((G1-E1)/7),ROWS(A2:A5))+1).
- Result on the example
- Tom in
E2 - Works in
- Every current version
- Google Sheets
- Same formula
See it work
The formula is already in E2. Change any input and the result updates, or edit the formula to experiment.
How it works
From January 5 to March 18 is 72 days, and INT(72/7) is 10 full weeks. MOD(10,4) is 2, because the four people have gone round twice and two more weeks have passed; adding 1 turns that into position 3, Tom. When the rotation grows, ROWS picks up the new length.
=INDEX(A2:A5,MOD(INT((G1-E1)/7),ROWS(A2:A5))+1)Result"Tom"
A2:A54 rows × 1 col: "Marcus", "Priya", "Tom", "Rosa"A range: 4 cells in one column.
G13/18/2026The value in G1.
E11/5/2026The value in E1.
G1-E172The - operator subtracts.
G1-E1)/710.28571429The / operator divides.
INT((G1-E1)/7)10INT: Rounds down to the nearest integer.- number
G1-E1)/710.28571429
- number
ROWS(A2:A5)4ROWS: Number of rows in a range.- array
A2:A54 rows × 1 col: "Marcus", "Priya", "Tom", "Rosa"
- array
MOD(INT((G1-E1)/7),ROWS(A2:A5))2MOD: Remainder after division.- number
INT((G1-E1)/7)10 - divisor
ROWS(A2:A5)4
- number
MOD(INT((G1-E1)/7),ROWS(A2:A5))+13The + operator adds.
INDEX(A2:A5,MOD(INT((G1-E1)/7),ROWS(A2:A5))+1)"Tom"INDEX: Value at a given row and column of a range.- array
A2:A54 rows × 1 col: "Marcus", "Priya", "Tom", "Rosa" - row_num
MOD(INT((G1-E1)/7),ROWS(A2:A5))+13
- array
In Google Sheets
The same formula works in Google Sheets: =INDEX(A2:A5,MOD(INT((G1-E1)/7),ROWS(A2:A5))+1). We ran it in Google Sheets mode on the same data and it returns Tom.
Other ways to do it
Each one was run on the same example sheet.
| Formula | Result | When to use it |
|---|---|---|
| =CHOOSE(MOD(INT((G1-E1)/7),4)+1,A2,A3,A4,A5) | Tom | CHOOSE lists the people directly; fine for a short, fixed rotation. |
Common mistakes
- For a daily rotation, drop the division:
MOD(G1-E1,ROWS(A2:A5))+1. - The start date must be the first day of Marcus's turn. A start in the middle of a week shifts every handover day.
Try it yourself
Same data, empty answer cell. Your formula is graded instantly, then re-checked on changed data, so a typed-in number won't pass.
Find who is on duty for a date in a rotation
E1. In E2, return who is on call on the date in G1.Questions
Does it work for dates before the start?
Yes. MOD returns a positive remainder for negative numbers in Excel and Google Sheets, so the rotation runs backwards correctly.
How do I list the next four weeks?
Use SEQUENCE: =INDEX(A2:A5,MOD(INT((G1-E1)/7)+SEQUENCE(4,1,0),ROWS(A2:A5))+1).
Checked by running on 2026-10-30: every formula and result on this page was calculated by the Spreadsheet Practice formula engine, in both Excel and Google Sheets modes.