I'm trying to use the Google Sheets script editor to create a set of sheets from a form to create individual sheets named after the value of each cell in column "B" and populated with all the data in rows 1 and X, where X is the value of the row for each sheet.
What I have so far is:
function makeSheets() {
var ss = SpreadsheetApp.getActive();
var sheets = ss.getSheets();
sheets[0].getRange('B2:B100')
.getValues()
.forEach(function (el, i) {
if (el[0] && !ss.getSheetByName(el[0])) ss.insertSheet(el[0], sheets.length +i)
});
}