Google Apps Script

In a project, I was tasked with automating workflows in Google Sheets that would save a team working in Sheets time. That is where Google Apps Script, aka GAS, came in. Here are my working list of notes.

spreadsheet

The GAS spreadsheet service allows interactive with spreadsheets stored in OneDrive. Here are my spreadsheet specific notes on Google apps script.

handling case of cell with value 0

We want to perform an action if both cells are empty while omitting the case when cell value is 0. Cell is an object with properties of one cell. value is the value of another cell.

Performs action if cell value is 0 (not good)

  else if(cell["value"]==value&&!value) { // using transitive property
    // perform action
  }

Does not perform action if cell value is 0 (good)

  else if(cell["value"]==value&&!value&&value!="0") {
    // perform action
  }

Help with Google Apps Script

Need help with Google Apps Script? If you don't see what you want to do listed, don't worry. We can do that too. Drop me a line. Let's make it happen.

© Nicholas Shellabarger