I can't seem to figure out how to get my script to trigger only on the edit of specific cells and on the current sheet. I've tried just about everything and it just refuses to run the script at all if I change anything.
I've created new variables to try and select the specific cells, then trigger with an if statement all to no avail. The script below is the only current version I have working which triggers should I edit anything anywhere.
Please someone help me out, I've no idea what I've done wrong.
Edit: Updated the code I've been trying... Still not doing anything.
function onEdit(e) {
var sheet = SpreadsheetApp.getActiveSheet();
var r = sheet.getRange("D11");
if (r == 'Hide'){
r.hideRows(11);
}}