Repeat a set of numbers based on dependents

SG10

New Member
Joined
Apr 22, 2024
Messages
6
Office Version
  1. 365
Platform
  1. Windows
Hi - I want a a set of numbers (0 - 25) to keep repeating itself - but I want the number of times it repeats itself and the highest number to be an input that can be changed easily.

For example, I want it to repeat itself 2 times then keep going into infinity (i.e. 0-25, 0-25, 25+.......). Then change the scenario to repeat it self 1 time and go to 30 instead of 25
 

Excel Facts

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.
Hi & welcome to MrExcel.
How about
Fluff.xlsm
AB
1Repeat3
2max5
30
41
52
63
74
85
90
101
112
123
134
145
150
161
172
183
194
205
21
Sheet5
Cell Formulas
RangeFormula
A3:A20A3=TOCOL(IF(SEQUENCE(,B1),SEQUENCE(B2+1,,0)),,1)
Dynamic array formulas.
 
Upvote 0
Thank you very much! - but this stops it at 25 on the last set. Is there a way for it to go into infinity beyond that last repeat?
 
Upvote 0
Ok, how about
Excel Formula:
=VSTACK(TOCOL(IF(SEQUENCE(,B1),SEQUENCE(B2+1,,0)),,1),SEQUENCE(40,,0))
 
Upvote 0
Ok, how about
Excel Formula:
=VSTACK(TOCOL(IF(SEQUENCE(,B1),SEQUENCE(B2+1,,0)),,1),SEQUENCE(40,,0))
This works! - is there a way to do this without an array formula?
 
Upvote 0
What do you mean without an array formula?
 
Upvote 0
Do you mean you want a drag down formula?
If so why?
 
Upvote 0

Forum statistics

Threads
1,216,077
Messages
6,128,673
Members
449,463
Latest member
Jojomen56

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