Spreadsheet Practice

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"

  1. A2:A54 rows × 1 col: "Marcus", "Priya", "Tom", "Rosa"

    A range: 4 cells in one column.

  2. G13/18/2026

    The value in G1.

  3. E11/5/2026

    The value in E1.

  4. G1-E172

    The - operator subtracts.

  5. G1-E1)/710.28571429

    The / operator divides.

  6. INT((G1-E1)/7)10

    INT: Rounds down to the nearest integer.

    • numberG1-E1)/710.28571429
  7. ROWS(A2:A5)4

    ROWS: Number of rows in a range.

    • arrayA2:A54 rows × 1 col: "Marcus", "Priya", "Tom", "Rosa"
  8. MOD(INT((G1-E1)/7),ROWS(A2:A5))2

    MOD: Remainder after division.

    • numberINT((G1-E1)/7)10
    • divisorROWS(A2:A5)4
  9. MOD(INT((G1-E1)/7),ROWS(A2:A5))+13

    The + operator adds.

  10. INDEX(A2:A5,MOD(INT((G1-E1)/7),ROWS(A2:A5))+1)"Tom"

    INDEX: Value at a given row and column of a range.

    • arrayA2:A54 rows × 1 col: "Marcus", "Priya", "Tom", "Rosa"
    • row_numMOD(INT((G1-E1)/7),ROWS(A2:A5))+13

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.

FormulaResultWhen to use it
=CHOOSE(MOD(INT((G1-E1)/7),4)+1,A2,A3,A4,A5)TomCHOOSE 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

On-call duty rotates weekly through the list, starting with Marcus in the week of 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.