--
You received this message because you are subscribed to the Google Groups "Google Apps Script Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-script-c...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-script-community/b0e5b242-4e82-464f-8eb0-471b2a9a04a4n%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-script-community/CAFX%2Bz3WMvP2C8%3D7AmmKB6gL7%3Dg_vmWXFxC-OPz%2BgY_gaxUt2GA%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-script-community/CAP5ssfwk2JzSAhZcnW2FT5QMhiAdD%2B5o%3DT5B9zckQ4eWHfPhsw%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-script-community/CAFX%2Bz3UvDyXcq7B0M%3Ddg2dc%3DG%3DLLK1FVaY2EaFMc3zcph0dTYw%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-script-community/CAP5ssfznSNfM6TUxFK%2Bo7RhKRjrKXLsYBsLOyvROxc-kZDr1YQ%40mail.gmail.com.
Have not heard back, so I modified the function for you. I removed use of script properties because you don’t need it. Also if you want this to get triggered on edits, you need to rename your function as per below. Make sure there is only one function with that name in your script.
Here is what you need:
function onEdit(e) {
var row = e.range.getRow();
var col = e.range.getColumn();
if ((row !=12) || (col != 7)) {return;}
var ss = SpreadsheetApp.getActiveSpreadsheet();
var sheet = ss.getActiveSheet();
var sheetName = sheet.getSheetName();
if (sheetName != "Sheet8") {return;}
var oldValue = e.oldValue;
var valueToCheck = sheet.getRange("G12").getValue();
if (valueToCheck > 5 && valueToCheck != oldValue) {
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-script-community/CAP5ssfznSNfM6TUxFK%2Bo7RhKRjrKXLsYBsLOyvROxc-kZDr1YQ%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-script-community/008d01d76590%24e2198be0%24a64ca3a0%24%40gmail.com.
You are welcome.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-script-community/CAP5ssfwEkRrEM%2Bgesv%3DTmYWUvKK0H-7%3DuRTVqJaTqf8G2ASQEQ%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-script-community/001a01d76600%24746a36b0%245d3ea410%24%40gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-script-community/CAP5ssfwfoi3usA%2B7OPUoLAYi_in5NvETk1GoFPK3byqrnof9MA%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-script-community/CAFX%2Bz3Vf3-603m97inV%2BrWBcpWHY41izfFap3uJMR0Z6wL2O4Q%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-script-community/CAP5ssfx55dY4%3DnEfW0HAU_Yc5SiWMaBCrq%3Dw%3DSu2k26ehVV%3DNA%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-script-community/CAFX%2Bz3Wf9U48XWL_85pVy9rggynrDyOxvW_42befm%3DCsjAuvCA%40mail.gmail.com.
Laurie Nason
The KAUST School – Operational Analyst
Mobile: +966-54-564-3698
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-script-community/CA%2BA7ZWLJ%2B1gT9MZgEa84HZYe5J1jzNc_JQaA3BQDG3n-V%3DEW9A%40mail.gmail.com.