How to generate 111112222233333 in cells

riteon

New Member
Joined
Apr 30, 2010
Messages
24
Hi Guys,

How can I populate cells vertically with numbered - e.g. 5 x 1's then 5 x 2's then 5 x 3's up to 100 (making 500 cells populated?) Obviously I may want to use other numbers and/or a higher/lower quantity but need the general idea in order to do this. E.g. the rule would be something like this; start number, times to print before increment, number of times to increment. Thanks

A
-
1
1
1
1
1
2
2
2
2
2
3
3
3
3
3


Thanks in advance
 

Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK
For the specific number range you have shown, there are various methods, here's one.

Assuming you want the first 1 in cell A1...
Code:
=ROUNDUP(ROW()/5,0)
and copy down to row 100.

If you're starting in A2 instead of A1, use this instead...
Code:
=ROUNDUP((ROW()-1)/5,0)
 
Upvote 0
For the specific number range you have shown, there are various methods, here's one.

Assuming you want the first 1 in cell A1...
Code:
=ROUNDUP(ROW()/5,0)
and copy down to row 100.

If you're starting in A2 instead of A1, use this instead...
Code:
=ROUNDUP((ROW()-1)/5,0)

Hi gerald, thanks for the speedy reply.

How about if I wanted to start the sequence with X000055 (produce this 12 times) then X000056 (then repeat this 12 times).

Thanks
 
Upvote 0

Forum statistics

Threads
1,224,618
Messages
6,179,919
Members
452,949
Latest member
beartooth91

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top