0

I am trying to make a message box appear when the condition in a specific cell is met. However, it applies to all the cells in all the sheets. What is the code for this?

function onEdit(e){
var sheet = SpreadsheetApp.getActiveSheet();
const VITALS = ss.getSheetByName("VITAL SIGNS")

var temp = sheet.getRange("C10").getValues();

if (temp >= 38 ){
Browser.msgBox('WARNING: Temperature is above normal levels')}
else
if (temp <= 36) {
Browser.msgBox('WARNING: Temperature is below normal levels')}
else
if (temp >=36) {
return
 }
}

Thank you!

I tried several other codes but no progress.

klowi
  • 1
  • What action do you want to trigger your function? Currently it will trigger on any edit to any cell – Cooper Dec 03 '22 at 20:34

0 Answers0