if cell is empty google sheets code example
Example 1: google sheets count cells if not blank
# Basic syntax:
=COUNTA(range)
# Example usage:
=COUNTA(A1:B26)
Example 2: google script check if cell is empty
var ss = SpreadsheetApp.getActiveSpreadsheet();
var sheet = ss.getSheets()[0];
var range = sheet.getRange("B2:D4");
Logger.log(range.isBlank());