1

I'm currently working on setting up a sheet, but I want to add columns in one worksheet based on rows in another worksheet.

I have no idea if this is even possible, I've tried googling it. Might be that I googled the wrong query.

The three rows in the image link below need to get duplicated based on the number of rows in another worksheet. Like a template.

1
  • The image shows only two rows with data and several blank rows. Is there a missing row?
    – Rubén
    May 15, 2019 at 13:41

2 Answers 2

0

To add columns based on data, use the Spreadsheet Service or the Spreadsheet Advanced Service of Google Apps Script.

You should decide how the code will be called. This could be from the Apps Script editor, from custom Google Sheets UI buttons, menus, dialogs, sidebars or by using triggers.

As an alternative you could use Google Sheets add-on or the Google Sheets API.

0

=ARRAYFORMULA(SPLIT(TRANSPOSE(QUERY(TRANSPOSE(SPLIT(REPT(TRANSPOSE(
 QUERY(TRANSPOSE(A1:C2&"♂"),,999^99))&"♀", 
 COUNTA(Sheet2!A3:A)), "♀")),,999^99)), "♂"))

0

2
  • What does this do? May 17, 2019 at 15:47
  • exactly what you requested... adding more rows in Sheet2 (column A) will auto-add columns in Sheet1
    – user0
    May 17, 2019 at 20:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.