Trying to create a button to replace the contents of cell A1 - sheet1, cell E1 - sheet2 and cell E1 sheet3 with "Card_Id". Each cell contains different text and I want to align the titles as the data within them is the same. The data and titles within the sheet is replaced daily with updated data so would like to click a button and all the titles are aligned.
Tried to use this but didn't work:
var spreadsheet = SpreadsheetApp.getActive();
spreadsheet.getRange('A1').activate();
spreadsheet.getCurrentCell().setValue('Card_Id');
spreadsheet.getRange('A2').activate();
spreadsheet.setActiveSheet(spreadsheet.getSheetByName('Checklist items'), true);
spreadsheet.getRange('E1').activate();
spreadsheet.getCurrentCell().setValue('Card_Id');
spreadsheet.getRange('E2').activate();
spreadsheet.setActiveSheet(spreadsheet.getSheetByName('Card Updates'), true);
spreadsheet.getCurrentCell().setValue('Card_Id');
spreadsheet.getRange('E2').activate();
};```