I managed to collect data of user typing in and by using `onChange` trigger, I did meet my requirements for my task. However, I realized that for example I am filling up Column A1:A4. If my A1:A3 is out of range, it will trigger the email. But if my A4 is within range, the values of A1:A3 will still trigger the email eventhough it has trigger it before. How do I make sure that the values that have been capture do not trigger the email again?

```
function myFunction() {

  var ss = SpreadsheetApp.getActiveSheet();
  currentsheet = ss.getSheetName();
  //var values = ss.getRange(a1Notation)
  //console.log(values);
  var lastcol = ss.getLastColumn();
  var vibrationtemplate = HtmlService.createTemplateFromFile("vibration");
  var temperaturetemplate = HtmlService.createTemplateFromFile("temperature");
  //console.log(lastcol);

  if((currentsheet == 'A Vibration') || (currentsheet == 'B Vibration')){
    console.log(currentsheet);
    for(var i =2; i<=lastcol; i++){
     var cell = ss.getRange(i,lastcol).getValues();
      console.log(""+cell);

      if(cell > 8){
        console.log("Value is more than 8 and current value is "+cell);
        vibrationtemplate.vibrate = cell;
        MailApp.sendEmail("someone@gmail.com",
    "Parameter Out of Range Notification",
     "",{htmlBody: vibrationtemplate.evaluate().getContent()});
    }
      }
    }

  if((currentsheet == 'A Temperature') || (currentsheet == 'B Temperature')){
    console.log(currentsheet);
    for(var i =2; i<=lastcol; i++){
    var cell = ss.getRange(i,lastcol).getValues();
      console.log(""+cell);
      if(cell > 80){
        console.log("Value is more than 80 and current value is "+cell);
        temperaturetemplate.temp = cell;
        MailApp.sendEmail("someone@gmail.com",
    "Parameter Out of Range Notification",
     "",{htmlBody: temperaturetemplate.evaluate().getContent()});
    }
    }

  }
}

```

EDIT: Latest code - Using a daily trigger and only checks at the end of the day.

```
function myFunction() {

  const ss = SpreadsheetApp.getActiveSheet();
  var sheets = SpreadsheetApp.getActiveSpreadsheet().getSheets();
  var sheetNumber = sheets.length; //Get number of sheets within Spreadsheet
  var currentSheet = ss.getIndex()-1; //Get index of current sheet with 0 indexing
  var vibrationtemplate = HtmlService.createTemplateFromFile("vibration"); //Create HTML for email by grabbing template from vibration.html
  var temperaturetemplate = HtmlService.createTemplateFromFile("temperature"); //Create HTML for email by grabbing template from temperature.html

  const vibrationlimit = 8; //Set vibrationlimit as constant equals to 8
  const temperaturelimit = 80; //Set temperaturelimit as constant equals to 80

  var currentDate = new Date(); //Get system Date and Time
  var currentDay = currentDate.getDate(); //Extract Date from Full Date(currentDate)
  var currentMonth = currentDate.getMonth() +1; //Extract Month from Full Date(currentDate), add +1 as month index start from 0.

  for (var z = currentSheet ; z<sheetNumber ; ++z ){

  SpreadsheetApp.setActiveSheet(sheets[z])
  var lastcol = sheets[z].getLastColumn();
  var lastrow= sheets[z].getLastRow();
  var cellDate = sheets[z].getRange(1,lastcol).getValues();
  var formattedCellDate = new Date(cellDate);
  var cellDay = formattedCellDate.getDate();
  var cellMonth = formattedCellDate.getMonth() + 1;

    if((z==0) || (z==2)){
      if((cellDay == currentDay) && (cellMonth == currentMonth)){ 
    for(var i = 2; i<=lastrow; i++){
     var scxvibrationname = sheets[z].getRange(i,1).getValues();
     var vibration = sheets[z].getRange(i,lastcol).getValues();
        if(vibration > vibrationlimit){
          Logger.log("Vibration over 8 - Current Value is "+vibration);
        vibrationtemplate.vibrate = vibration;
        vibrationtemplate.scxvibration = scxvibrationname;
        }

    }
      }

    }
}

```