repeating numbers

tzenekkik

New Member
Joined
Jun 3, 2002
Messages
39
actually not a question, more like an Excel trick someone could use.

Formula to produce an array of numbers, starting from 1, repeating that number x times.
After that, repeating the next integer x times.
Until the maximum y is met. From then on, it repeats itself.

This description might be complicated, but English is not my native language. Feel free to add text to this thread to make this thread easier to find.

in cell B6, type =MOD(INT((ROW()-ROWS(B$1:B$5)-1)/B$2);B$3)+1 (some users have to substitute the ; with a ,)

copy this down to e.g. B999

in B2 typ a value (e.g. 3) this is x
in B3 typ a value (e.g. 5) this is y
see what happens and then fiddle with the values in B2 and/or B3

have fun.
 

Excel Facts

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.

Forum statistics

Threads
1,214,615
Messages
6,120,538
Members
448,970
Latest member
kennimack

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