Google-sheets – How to flip query results in Google Sheets

google sheetsgoogle-sheets-query

I am trying to select multiple rows from one row in a source sheet based on another column in the source sheet. E.g.:

Name   Start                  Add
Bob    2012-01-01 01:01:00    10:00:00
Tim    2020-01-01 01:01:00    04:00:00

And what I am looking for in the output is something like:

Bob                    Tim
2012-01-01 11:01:00    2020-01-01 05:01:00
2012-01-01 21:01:00    2020-01-01 10:01:00
2012-01-02 07:01:00    2020-01-01 15:01:00
...

I'm not sure how to do this, if it's possible… I've been working on getting the time modification done (which also isn't intuitive) but I realized I also don't know how to repeat and pivot the results.

Best Answer

In Test_Sheet You'll find following formula for each name

={transpose(A2:B2);arrayformula(SEQUENCE(D2,1,1,1)*C2+B2)}

Tried to make it for whole array, but SEQUENCE failed me to return array.