I want to combine 40 different spreadsheets into one master sheet through referring to a only a specific tabs under these sheets (AS SPREADSHEETS CONATINS MULTIPLE TABS) Also want that the data in the master will only appear submit button is clicked I found so many script and tried them but they all are combining all tabs in the same spreadsheets Is there anyone who can help here ?
function myFunctionCOMBINE() {
// ={FILTER({'Partial Data 1'!A2:G,"Data Tab 1 - Row "&ROW('Partial Data 1'!A2:A)}, ‘Partial Data 1'!A2:A<>"");
// FILTER({'Partial Data 2'!A2:G,"Data Tab 2 - Row “&ROW('Partial Data 2'!A2:A)}, ‘Partial Data 2'!A2:A<>"");
// FILTER({*Partial Data 3'!A2:G,"Data Tab 3 - Row “&ROW('Partial Data 3'!A2:A)}, ‘Partial Data 3'!A2:A<>"")}
//set variable
const masterSheet = "ASM-A30";
const masterSheetFormulaCell = "A2";
const ignoreSheets = ["Verified NDRx","Business Tracker","NDRX","PMT_EBx","PMT_EBx.","NDRx PMT Business Tracker.","Analysis"];
const dataRange = "A2:AA";
const checkRange = "A2:A" ;
//end set variables
const ss = SpreadsheetApp.getActiveSpreadsheet() ;
ignoreSheets.push(masterSheet) ;
const allsheets = ss.getSheets() ;
const filteredListofSheets = allsheets.filter(s => ignoreSheets.indexOf(s.getSheetName()) == -1);
let formulaArray = filteredListofSheets.map(s => `FILTER({'${s.getSheetName()}'!${dataRange},"${s.getSheetName()} - Row "&ROW('${s.getSheetName()}'!${dataRange})}, '${s.getSheetName()}'!${checkRange}<>"")`);
let formulaText = "={" + formulaArray.join(";")+ "}"
//console.1og( formulaText) ;
ss. getSheetByName(masterSheet).getRange(masterSheetFormulaCell) .setFormula(formulaText) ;
}