I have a sheet on googlesheet where there is a lot of line and column.
I want clear the cell where there is the value 0 in the column B.
I wrote this code but it doesn't work, I'm not an expert of javascript :|
function clean0() {
var sheet = SpreadsheetApp.getActiveSheet();
var data = sheet.getDataRange().getDisplayValues();
if(data == "0"){
sheet.getRange('B:B').clearContent();
}
}
Where is my mistake?
Thanks for help :)
datais an array of arrays of values, and your comparisondata == "0"assumes thatdatais a value. - tehhowch