vendredi 27 décembre 2019

Or Statement Not working-can someone tells me why is it not working

function CheckWeekNum() {
  var weeknumber = 52;

  if(cur_year == 2019 || cur_year == 2026){
    weeknumber = 53;
    ssForReportSheet.getRange("A53").setValue("Week 53");
    ssForSpecialReportSheet.getRange("A53").setValue("Week 53");
  }

  if(cur_year !== 2019 || cur_year !== 2026){ 
    ssForReportSheet.getRange("A53").setValue("");
    ssForSpecialReportSheet.getRange("A53").setValue("");  
  }

  if(cur_week == weeknumber){
    ssForReportSheet.getRange(1,3,LastRow,1).setValue.clear;
    ssForSpecialReportSheet.getRange(1,3,LastRow,1).setValue("");
  }
}

Aucun commentaire:

Enregistrer un commentaire