Duplicate data from one branch into following branches

Hey all,
I’m working on filtering some excel data and I have two lists that I need to essentially combine. One list is a set of branches, each corresponding to a single day, and containing a list of room numbers. The second list is a matching set of branches indicating the length that a person was in each room. I would like to get a list that shows each room occupied on each day. Essentially I need to duplicate the room number by the length of stay and add each duplicate into the following day’s branch.


List data:
upload_RoomData.gh (7.5 KB)

Thank you for this! Unfortunately combining the lists isn’t exactly what I meant. I need to create a list that has exclusively room numbers, but has duplicated the data across the following days according to the length of stay. For example: room 219 (first entry on the left list) has a length of stay of 10 days (first entry on the right list) so I would like to create a new list that has 219 in branch 0 through branch 9, and then do the same for all following entries. Thank you for your time.

This doesn’t look useful to me, is it what you want?


upload_RoomData_2022Oct7a.gh (25.2 KB)

1 Like

Almost! I just needed to add a couple more things to format it the way I wanted. Never used the flip last component, seems useful. Thank you so much for pointing me in the right direction! Here is the final result that I was hoping for: