Skip to content

Instantly share code, notes, and snippets.

@marcup
marcup / sumNonMatchingColoredCells.gs
Last active October 19, 2020 23:21
Google Docs Script that gives the sum of values in cells of a sheet that don't match with a specified background colour
/**
* @param {range} sumRange Range to be evaluated
* @param {range} colorRef Cell without background color to be searched for in sumRange
* @return {number}
* @customfunction
*/
function sumNonMatchingColoredCells(sumRange,colorRef) {
var activeRange = SpreadsheetApp.getActiveRange();
var activeSheet = activeRange.getSheet();
@marcup
marcup / sumMatchingColoredCells.gs
Last active February 13, 2019 11:42
Google Docs Script that gives the sum of values in cells of a sheet that match with a specified background colour
/**
* @param {range} sumRange Range to be evaluated
* @param {range} colorRef Cell with background color to be searched for in sumRange
* @return {number}
* @customfunction
*/
function sumMatchingColoredCells(sumRange,colorRef) {
var activeRange = SpreadsheetApp.getActiveRange();
var activeSheet = activeRange.getSheet();
@marcup
marcup / countNonMatchingColoredCells.gs
Last active February 13, 2019 11:40
Google Docs Script to count number of cells in a sheet that don't match with a specified background colour
/**
* @param {range} countRange Range to be evaluated
* @param {range} colorRef Cell without background color to be searched for in countRange
* @return {number}
* @customfunction
*/
function countNonMatchingColoredCells(countRange,colorRef) {
var activeRange = SpreadsheetApp.getActiveRange();
var activeSheet = activeRange.getSheet();
@marcup
marcup / countMatchingColoredCells.gs
Last active May 11, 2022 22:56
Google Docs Script to count number of cells in a sheet that match with a specified background colour
/**
* @param {range} countRange Range to be evaluated
* @param {range} colorRef Cell with background color to be searched for in countRange
* @return {number}
* @customfunction
*/
function countMatchingColoredCells(countRange,colorRef) {
var activeRange = SpreadsheetApp.getActiveRange();
var activeSheet = activeRange.getSheet();

Keybase proof

I hereby claim:

  • I am marcup on github.
  • I am marcup (https://keybase.io/marcup) on keybase.
  • I have a public key ASCAmJQZ6TzjWB_dG5tZ3PUOpbwE6WNfkmYNJbQQ6i09Hwo

To claim this, I am signing this object: