You can use this:
function onEdit(e) {
var editedSheet = e.source.getActiveSheet();
var editedCell = e.range;
var row = editedCell.getRow();
var col = editedCell.getColumn();
//Check if B2:Y61 was modified in Sheet "Y" based on its row and column index
if(row>=2 && row<=61 && col>=2 && col<=25 && editedSheet.getName()=="Y"){
//Send email
var subject = "Sheet: "+editedSheet.getName();
var message = "Cell "+editedCell.getA1Notation()+" was modified from '"+e.oldvalue+"' to '"+e.value+"'";
MailApp.sendEmail("email address",subject,message);
}
}
What it does?
- Using the Google Sheets events, you can get the active sheet that is being modified using
e.source
, get the cell being modified using e.range
and even get the old and the new value of the cell using e.oldValue
and e.value
- You just need to include a condition to check if the cell modified is within the range that you prefer
B2:Y61
which should have a min row = 2, max row = 61, min col = 2 and max col = 25 and sheet name should be "Y".
- Send an email using MailApp.sendEmail() if all the conditions were met.
Note:
You need to create this as an installable trigger since it will use mail service which requires authentication.
To manually create an installable trigger in the script editor, follow these steps:


OUTPUT:

(UPDATE)
This code will copy changes done in X_input sheet to Y_input sheet and check if email should be sent when B2:Y61 range was modified.
function onEdit(e) {
var editedSheet = e.source.getActiveSheet();
var editedCell = e.range;
var row = editedCell.getRow();
var col = editedCell.getColumn();
var ySheet = SpreadsheetApp.getActiveSpreadsheet().getSheetByName("Y_output");
//Check if edit is done in Sheet "X_input"
if(editedSheet.getName()=="X_input"){
//copy modified cell to Y_output sheet
ySheet.getRange(row,col).setValue(e.value);
//check if modified cell is within B2:Y61 range and send an email
if(row>=2 && row<=61 && col>=2 && col<=25){
//Send email
var subject = "Sheet: "+editedSheet.getName();
var message = "Cell "+editedCell.getA1Notation()+" was modified from '"+e.oldvalue+"' to '"+e.value+"'";
MailApp.sendEmail("ronoel@google.com",subject,message);
}
}
}