Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

How can we list 31 rows and then repeat at row one, and do this seven times?

I am trying to list dates in October, which is 1 to 31 days, and do this seven times. When I hit row 31, I want the list to start again at row 1. How can I do that?

I have an ‘Output’ sheet where I am trying to show my results and a ‘Daily Forecast’ sheet where the data sits. Let’s say I have 10/1/2021 in cell FP394 and it goes down to 10/31/2021 in cell FP424. How can I repeat the range of 10/1/2021 to 10/31/2021, seven times, stacking the next one under the prior one, all in one row? I tried Offset, Mod, and Row functions, but I couldn’t get it working. It never goes back to the very first cell (FP394) after the 31st cell (FF424). I would like a formula solution, not a VBA solution. Thanks!

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

Expanding on my comment, you can use mod() and row() to get what you are after:

=DATEVALUE("2022-10-" & 1+MOD(ROW()-22, 31))

That’s assuming that your dates start on row 394. Adjust accordingly if that changes.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading