I have 2 functions that I can get to work individually, but I have know idea how to combine them and have them work concurrently.
The first function pulls the value from A1 (which references a cell in another sheet) and returns it to B1. The second takes the value form B1 and renames the tab.
function onEdit(e){
var app = SpreadsheetApp;
var ss = app.getActiveSpreadsheet();
var sh = activeSheet = ss.getActiveSheet();
var newName = activeSheet.getRange(1,1).getValue();
activeSheet.getRange(1,2).setValue(newName);
}
function onEdit(e) {
if(e.range.rowStart === 1 && e.range.columnStart === 2) {
e.source.getActiveSheet().setName(e.value);
}
}
From what I've found online, I'm guessing an if statement would help but I'm not sure how to implement it.