I just wrote a UDF to sum up a range based on whether or not the background is colored. I don't know if the UDF itself is written efficiently or not, but it seems to work. The code is as follows (there are two arguments; one is the range being summed, the other is a boolean. If TRUE, the UDF sums colored cells, if FALSE it sums non colored cells):
The problem I have is that when I use the formula in the spreadsheet, it doesn't update when I color new cells. It also doesn't update if I press F9. The only way to have it change is by physically double clicking in the cell, and pressing enter (basically reentering the formula). Is there anyway around this?
Bookmarks