Ok so I currently am running this script which works perfect if you make an edit on the current tab you're wanting to change the sheet name for...
function onEdit(e) {
if(e.range.getA1Notation() !== 'A1') return;
var s = e.source.getActiveSheet()
s.setName(s.getRange('A1')
.getValue())
}
What I tried to do is use a query formula that will change the cell value based on the cell of a different tab. That didn't work, because it's not them making an edit. It's happening automatically when the cell in a different tab changes. Is there any script that would allow me to change the tab name based on the value of a cell from a different tab?
Maybe I need to be using OnChange instead? Does anyone have an example to make OnChange do the same thing?
Is there any script that would allow me to change the tab name based on the value of a cell from a different tab?. Can I ask you about the detail of both your current issue and your goal? - TanaikeSheet1 and Sheet2. I want to change the name of Sheet2 based on the cell value of B2 on Sheet1 anytime it's changed.. When the cell B2 of "Sheet1" is changed, you want to change the sheet name of "Sheet2" (In this case, this is 2nd tab?). Is my understanding correct? - Tanaike