How do I get Excel AutoFill an "advanced" pattern?

How can I get Excel to AutoFill a pattern as follows (including the leading zero if needed):

010001
011001
012001
020001
021001
022001
...
990001
991001
992001

I can't get Excel to respect the leading zero or detect this pattern.
Is there a trick to it?


Solution 1:

Assuming that you start in row 1, type in the following formula:

=TEXT((INT((ROW()-1)/3)+1),"00")&MOD(ROW()-1,3)&"001"

Solution 2:

Or you use 2 helping columns and delete them afterwards.

  • Format Column A + B as text and fill column A with auto increment.

  • fill down column B while holding ctrl to avoid auto increment

  • use a simple formula like =A1+B1 to concat your strings and fill down column C

  • copy column C using only the values

    enter image description here