MrExcel Publishing
Your One Stop for Excel Tips & Solutions

filling column with n sets of numbers


Posted by steve on September 09, 2001 8:57 PM

I want to fill a column with n sets of numbers e.g. starting with the number '1' in A1, fill the first n rows with '1', the next n rows with '2' and so on until some end value I specify e.g. stop after the 60th iteration, so I end up with a column that contains the numbers 1-60, each repeated n times. I can't work out how to do this using 'Series'. Am I mssing something?


Posted by Zoltan on September 09, 2001 10:20 PM


Here's one way. Let's say n = 3, then enter 1 in A1, enter the following in A2 and fill down as far as required :-
=IF(MOD(ROW(),3)=1,OFFSET(A2,-1,0)+1,OFFSET(A2,-1,0))


Posted by steve on September 09, 2001 10:47 PM

Perfect! Many thanks Zoltan.