Repeat rows in Google Spreadsheet based on a cell value (BUT repeated rows must be 7 days apart)

  Kiến thức lập trình

I have a Google spreadsheet with two sheets: ‘Input Sheet’ and ‘Output Sheet’. I would like all rows in the ‘Input Sheet’ to be repeated and stored in the ‘Output Sheet’ based on a cell value in column H.

I got the repeater to work with the following formula (formula is in cell A2 of the ‘Output Sheet’):

=ARRAYFORMULA(
     VLOOKUP(
        TRANSPOSE(SPLIT(QUERY(REPT(ROW('Input Sheet'!A2:A)&" ",'Input Sheet'!H2:H),,9^9)," ")),
        {ROW('Input Sheet'!A2:A),'Input Sheet'!A2:I},
        {1,2,3,4,5,6,7,8,9}+1,0
     )
)

However, in the ‘Output Sheet’, the values in columns F and G are just repeated based on the ‘Input Sheet’. I would like column F and G values to be exact 1 week apart. For ex: cell F2 should be 4/7/2024 and cell G2 should be 4/13/2024. Cell F3 should be 4/14/2024 and cell G3 should be 4/20/2024, and so on…

A little help on how I can accomplish this please. Thank you!

I have included the spreadsheet below:

https://docs.google.com/spreadsheets/d/14jxO12zW7SKe6e5TpmLA6nIdPjWP17XZtghGvWmgn1M/edit?usp=sharing

New contributor

Tapan is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.

LEAVE A COMMENT