Populate Number According to Repeat Frequency

kumara_faith

Well-known Member
Joined
Aug 19, 2006
Messages
951
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

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.
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,223,886
Messages
6,175,195
Members
452,616
Latest member
intern444

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