skip to Main Content

Javascript – TypeError: Cannot read properties of null (reading 'getformula')

function countColoredCells(countRange, colorRef) { var activeRange = SpreadsheetApp.getActiveRange(); var activeSheet = SpreadsheetApp.getActiveSheet(); var activeformula = activeRange.getformula(); var countRangeAddress = activeformula.match(/((.*),/).pop().trim(); var backGrounds = activeSheet.getRange(countRangeAddress).getBackgrounds(); var colorRefAddress = activeformula.match(/,(.*))/).pop().trim(); var BackGround = activeSheet.getRange(colorRefAddress).getBackground(); var countColorCells = 0; for (var i =…

VIEW QUESTION
Back To Top
Search