Populate Number According to Repeat Frequency

kumara_faith

Well-known Member
Joined
Aug 19, 2006
Messages
922
Office Version
  1. 365
Hi,

I have the following table:

Cell Formulas
RangeFormula
L4:L15L4=K4+7
K5:K15K5=L4+1


In column M, I am trying to populate the code number repeatedly for the weeks based on the number of repeat frequency in cell O4. Since the repeat frequency is 2, the code is repeated twice for two weeks beginning with code 6 from cell P4. The correct result is shown in column M. Is there a way to use a formula to perform this where the result in column M changes according to the repeat frequency in cell and the beginning code in cell P4 ? Appreciate all the help.
 

Excel Facts

What is the fastest way to copy a formula?
If A2:A50000 contain data. Enter a formula in B2. Select B2. Double-click the Fill Handle and Excel will shoot the formula down to B50000.
How about?:

EDIT: Sorry too late I realized that there was already an answer.

Cell Formulas
RangeFormula
L4:L15L4=K4+7
M4:M15M4=LET( n, COUNT(K4:K1000), startCode, $P$4, repeatFrequency, $O$4, INT(SEQUENCE(n,,0)/repeatFrequency)+startCode )
K5:K15K5=L4+1
Dynamic array formulas.
 
Last edited:
Upvote 0
Hi Peter and Felix,

Thank you for your solution and both worked. Appreciate it and have a great day ahead. 🙏
 
Upvote 0
You're welcome. Glad we could help. Thanks for the follow-up. :)
 
Upvote 0

Forum statistics

Threads
1,215,069
Messages
6,122,959
Members
449,096
Latest member
Anshu121

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