Google-sheets – Add columns based on rows

concatenateformulasgoogle sheetsgoogle-sheets-arrayformulagoogle-sheets-query

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.

Best Answer

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.