Quantcast
Channel: Hot Weekly Questions - Web Applications Stack Exchange
Viewing all articles
Browse latest Browse all 9782

Repeat a sequence N times

$
0
0

I have this table

Name (Col A)Start Date (Col B)End Date (Col C)
Name_11/31/20232/2/2023
Name_21/16/20231/17/2023

and I am trying to change it to a long format, like this:

NameDate
Name_11/31/2023
Name_12/1/2023
Name_12/2/2023
Name_21/16/2023
Name_21/17/2023

I tried using sequence & splits, but I can only make it work for the first row, and i want the formula to dynamically add rows in table 2 whenever there is a new line in table 1.

Here is the formula am using:

=ARRAYFORMULA( SPLIT( A2& ","&SEQUENCE(C2-B2+1,1,B2,1),","))

I want it in either Google Sheets, but having them both would be great.


Viewing all articles
Browse latest Browse all 9782

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>