I’m trying to find the best way to sequence a set input and then in order on repeat give a specific output. Similar to the fill down repeating series in excel when you double click on a cell.
I have 2 types Y and N. For Y it can be B2, B4, B5, B6, B7, B8, B9 and for N it can be A1, A2, A3, A4. I need them to be repeated/looped.
Below is an example of my data.

Below is my desired output.

Below is the input I want repeated based on whether the data is Y or N.

Please let me know if you have any suggestion or tips for me!
Thank you!