If you have Microsoft 365 or Office 2021, enter the following formula in A1:
=MOD(SEQUENCE(100)-1,10)+1
It will spill to A1:A100.
In older versions:
Enter 1 in A1.
In A2, enter the formula =MOD(A1, 10)+1
Fill down to A100.
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
I have been getting on fine with using AutoFill in Excel using the 'fill handle', up to a point...
The problem I have is I can't figure out how to AutoFill a Series of REPEATING numbers (e.g. 1 to 10) in a Column in Excel - such as A1 to A10, then repeating in A11 to A20 and so on?
I tried the 'Fill' option in the Ribbon - Home>Fill>Series (Columns-Linear)-Step Value:1/Stop Value:10 - but that only fills in one 'set' of 1 to 10... how do I get it to repeat either a set number of times, or until a specific Cell, e.g. A100 ?
Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.
If you have Microsoft 365 or Office 2021, enter the following formula in A1:
=MOD(SEQUENCE(100)-1,10)+1
It will spill to A1:A100.
In older versions:
Enter 1 in A1.
In A2, enter the formula =MOD(A1, 10)+1
Fill down to A100.
Thanks @HansV -
Having researched both the MOD & SEQUENCE functions in your answer, I have no idea how it works but it does...!
SEQUENCE(100) generates the numbers
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, ..., 100
SEQUENCE(100)-1 returns
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, .., 99.
MOD(..., 10) calculates the remainder of these numbers after dividing them by 10:
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, ..., 9
Finally, we add 1 to this:
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1, 2, 3, 4, ..., 10