vendredi 13 décembre 2019

Google Sheet Script onEdit(e) if H2=Yes then make Column I (Checbox) pres-sable

I'm trying to find a specifc conditional format for a scenario on google sheet but I was unable to find anything regarding this (than changing color, format text etc).

Is it possible to write an onEdit(e) script that conditions if column Hn==Yes then make column I(checkbox) available to be pressed?

I tried with setFrozenColumns(9) is H column is blank or No but it doesn't work.

function chechBox(e) {

  var ss = SpreadsheetApp.getActiveSpreadsheet();
  var sh = e.range.getSheet();
  var range = e.range;
  if(sh.getName()!="Test")return;
  var colHValue=sh.getRange(e.range.rowStart,8).getValue()
  if (range.getColumn()==8 & colHValue==0 & colHValue=="No"){
    sh.setFrozenColumns(9);
  }
};

Thank you, M




Aucun commentaire:

Enregistrer un commentaire