Excel Formula to Rotate a List of Names
In this article
- 1. INDEX with MOD for a Fixed Rotation
- 2. INDEX with ROW and COUNTA for a Variable-Size List
- 3. OFFSET with MOD for a Rotated Range
- 4. CHOOSE with a Rotation Array
- 5. SEQUENCE and INDEX for Dynamic Arrays (Microsoft 365)
- 6. SORTBY with a Helper Column
- 7. ROTATE with a Custom LAMBDA Function
- 8. Power Query for Repeatable Rotation
- 9. Rotate by a Cell Reference Instead of a Hard-Coded Number
- 10. Handle Blanks and Errors with IFERROR
- How to Choose
- Frequently Asked Questions
- Final Thoughts
You can rotate a list of names in Excel without sorting or retyping by using a formula that shifts the list by a set number of positions. The simplest approach is a combination of INDEX, MOD and ROW (or SEQUENCE in Microsoft 365). This list covers ten practical formulas and techniques, from basic shifts to dynamic arrays, and is aimed at anyone who needs to rotate duty rosters, meeting hosts, or any repeating name list in Excel.
1. INDEX with MOD for a Fixed Rotation
This is the classic non-dynamic formula. If your names are in A2:A11 and you want to rotate by 3 positions, enter =INDEX($A$2:$A$11, MOD(ROW()-2+3, 10)+1) in the first output cell and drag down. The MOD function wraps the index back to the top when it passes the end of the list. It works in every Excel version and is easy to adjust by changing the single rotation number.
2. INDEX with ROW and COUNTA for a Variable-Size List
Hard-coding the list size (10 in the example above) breaks when you add or remove names. Replace the fixed 10 with COUNTA($A$2:$A$11) so the formula adapts automatically. The full version becomes =INDEX($A$2:$A$11, MOD(ROW()-2+3, COUNTA($A$2:$A$11))+1). This is worth using whenever your roster changes frequently.
3. OFFSET with MOD for a Rotated Range
OFFSET can return a reference that wraps around the list. In cell C2, enter =OFFSET($A$2, MOD(ROW()-2+3, 10), 0) and fill down. OFFSET is volatile (it recalculates on every sheet change), so use it only on small lists. The advantage is that it reads like a direct cell reference and is easy to explain to colleagues.
4. CHOOSE with a Rotation Array
For very short lists (up to 10 names), CHOOSE lets you specify the order explicitly. =CHOOSE(MOD(ROW()-2+3, 10)+1, $A$2, $A$3, $A$4, $A$5, $A$6, $A$7, $A$8, $A$9, $A$10, $A$11) returns the rotated name. This is not scalable, but it is transparent and avoids INDEX/MOD confusion for one-off tasks.
5. SEQUENCE and INDEX for Dynamic Arrays (Microsoft 365)
If you have Microsoft 365, you can rotate an entire list with one formula that spills. =INDEX(A2:A11, MOD(SEQUENCE(ROWS(A2:A11),,3), ROWS(A2:A11))+1) returns the list rotated by 3 positions in a single cell. No dragging is needed, and the result updates automatically if the source list changes size. This is the cleanest modern solution.
6. SORTBY with a Helper Column
Add a helper column next to your names with the formula =MOD(ROW()-2+3, 10), then use =SORTBY(A2:A11, B2:B11) to reorder the names by the helper values. This approach is easy to audit because the rotation order is visible in the helper column. It works in Excel 365 and Excel 2021.
7. ROTATE with a Custom LAMBDA Function
In Microsoft 365 you can define a reusable function. Go to Formulas > Name Manager > New, name it ROTATE, and set the Refers to box to =LAMBDA(list, n, INDEX(list, MOD(SEQUENCE(ROWS(list),,n), ROWS(list))+1)). Then =ROTATE(A2:A11, 3) rotates any list by any number. This is worth the setup if you rotate lists often.
8. Power Query for Repeatable Rotation
If your list lives in a table and you need to rotate it regularly, Power Query can do it without formulas. Load the table into Power Query, add an index column, then use a custom column with Number.Mod([Index]+3, 10) and sort by that column. Close and load to a new sheet. The query refreshes with one click when the source changes.
9. Rotate by a Cell Reference Instead of a Hard-Coded Number
Put the rotation amount in a cell, say E1, and reference it in the formula: =INDEX($A$2:$A$11, MOD(ROW()-2+$E$1, COUNTA($A$2:$A$11))+1). Changing E1 from 3 to 5 instantly rotates the list by five positions. This is the most flexible non-dynamic setup and avoids editing the formula each time.
10. Handle Blanks and Errors with IFERROR
If your list contains blank cells, COUNTA will undercount and the rotation will misalign. Wrap the formula in IFERROR and use a fixed range size: =IFERROR(INDEX($A$2:$A$11, MOD(ROW()-2+3, 10)+1), ""). For lists with gaps, consider using FILTER(A2:A11, A2:A11<>"") inside INDEX in Microsoft 365 to rotate only the non-blank names.
How to Choose
The right formula depends on your Excel version and how often the list changes. If you have Microsoft 365, use SEQUENCE with INDEX (item 5) or a LAMBDA (item 7) for the cleanest results. For older versions, INDEX with MOD and COUNTA (item 2) is the most robust. Use Power Query (item 8) when you need an auditable, refreshable process. Avoid OFFSET and CHOOSE on large or changing lists because they are volatile or hard to maintain. Always test with a small copy of your data before applying to a live roster.
Frequently Asked Questions
Can I rotate a list by a negative number?
Yes. MOD in Excel returns a positive result for negative numbers when the divisor is positive, so MOD(ROW()-2-3, 10) rotates the list in the opposite direction. Just replace the plus sign with a minus sign in the rotation term.
Why does my rotated list show #REF! errors?
This usually means the INDEX range is smaller than the number of rows you dragged the formula down. Ensure the output range does not exceed the source list size, or wrap the formula in IFERROR to return blank for extra rows.
Does this work in Google Sheets?
Yes. INDEX, MOD, ROW and COUNTA work the same in Google Sheets. SEQUENCE is also available in Google Sheets, so the dynamic array version (item 5) works there too.
How do I rotate a list that contains duplicate names?
Duplicates do not affect the rotation because the formula works by position, not by value. The same name will appear in the rotated position, which is correct for rosters where the same person appears more than once.
Can I rotate a list without a formula?
You can copy the list, paste it below itself, and delete the first few rows, but that is manual and error-prone. A formula or Power Query is more reliable for repeated use.
Final Thoughts
Rotating a list of names in Excel is a small problem with several solid solutions. Start with INDEX, MOD and COUNTA for compatibility, or use SEQUENCE if you have Microsoft 365. Keep the rotation amount in a cell so you can adjust it without editing formulas, and always verify the output against the original list before sharing.