0

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.

  • The image shows only two rows with data and several blank rows. Is there a missing row? – Rubén May 15 at 13:41
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

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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