Is it possible to selectively sum only those cells in a range where the data color property is set to a certain color ( I have used Red3 and Green3 FWIW )
I have mused over a function to do this, I’m not a spreadsheet programmer, and I do not want to reinvent the wheel, but acting selectively on a selection does not seem to be something weird, I just cannot find an existing answer.
I thought about some pseudocode.
SumQualifiedRange ( the_range, the_color ) {
Int nSum, nrlow, nrhigh, nColumn, nRow;
nrlow = range_low(the_range);
nrhigh = range_low(the_range);
nSum=0;
nColumn=column(the_range);
For nRow=nrlow to nrhigh {
If cell( nRow, nColumn ).properties.color = the_color {
nSum=nSum+ cell( nRow, nColumn).value;
}
}
return nSum;
}
Hmmm.
SUMIF() woulod be good if we could test the color there.