How to Create 52 Weekly Rows for Each Employee in Excel
Question details
The user needs to expand a single-column list of employee numbers into a two-column table where each employee number is repeated 52 times, paired sequentially with week numbers 1 through 52.

- Product
- Microsoft Excel
- Device & OS
- not provided
- Scenario
- Generating an annual weekly schedule or tracking sheet for multiple employees from a master employee list.
- Observed behavior
- The goal is to automatically duplicate each employee's ID across 52 rows while pairing it with sequential week numbers from 1 to 52, instead of manually copying and pasting.
Ensure your employee list contains no blank cells in the middle of the range, and determine whether you are using a newer version of Excel (like Microsoft 365) that supports dynamic array formulas, as this changes which method you should use.
Use Dynamic Array Formulas (Excel 365)
This is the fastest method for Excel 365 users, utilizing a single formula to generate the entire expanded 52-week table automatically.
Dynamic array formulas can process data and spill the results across multiple rows and columns instantly. By combining LET, SEQUENCE, MOD, HSTACK, and INDEX, you can generate the entire dataset from a single cell without dragging formulas down.
Click on the top-left cell of a blank area where you want the new two-column table to begin.
Type the following formula: =LET(n,A3:A10,s,SEQUENCE(ROWS(n)*52),wknums,MOD(s-1,52)+1,HSTACK(INDEX(n,INT((s-1)/52)+1),wknums))
Before pressing Enter, change the 'A3:A10' part of the formula to match the actual range where your employee numbers are located.
Press Enter. The formula will automatically spill the results into the adjacent rows and columns, displaying each employee paired with weeks 1 through 52.

Use Classic INDEX and MOD Formulas (All Excel Versions)
If you are using an older version of Excel that lacks dynamic arrays, you can use traditional formulas and fill them down manually.
Automate with a VBA Macro
Ideal for users who frequently need to generate these weekly schedules and prefer a one-click automated solution without dealing with complex formulas.
Seamlessly Expand Employee Data with WPS Spreadsheet
WPS Spreadsheet fully supports advanced array functions and classic lookup formulas, making it incredibly easy to manage employee schedules and restructure data just as you would in Microsoft Excel.
- 1. Open Your Data: Launch WPS Spreadsheet and open the file containing your master employee list.
- 2. Set Up Your Columns: Select an empty cell in a new worksheet or adjacent column where the expanded list will begin.
- 3. Apply Formulas: Enter the classic INDEX and MOD formulas to fetch the employee ID and corresponding week number.
- 4. Drag to Fill: Highlight both cells and double-click the fill handle to instantly populate 52 weekly rows for every employee on the list.

Frequently Asked Questions
Why am I getting a #SPILL! error when using the LET formula in Excel 365?
A #SPILL! error occurs when there is existing text, data, or formatting blocking the blank range where the dynamic array formula needs to output its results. Clear all the cells below and to the right of your formula to allow the data to expand.
Can I change the number of rows to 12 for monthly tracking instead of 52 weeks?
Yes, you can easily adapt the formulas. Simply replace the number 52 with 12 in either the dynamic array formula or the classic MOD and INDEX formulas. For example, use =MOD(ROW()-1,12)+1 to generate month numbers from 1 to 12.
What if I want to use the classic formulas, but my data starts on row 2 because I have headers?
If you are starting the classic formulas on row 2, the ROW() function will return 2 instead of 1, which offsets the math. You must subtract the header rows by replacing ROW() with (ROW()-1) or by referencing a cell like ROW(A1) so the formula's calculation starts counting properly.




