M
mark
Hello.
A user wants to sum value based upon cell color background.
I gave her a custom function to do thatm, based upon this:Function CellColorIndex(InRange As Range) As Integer
' This function returns the ColorIndex value of the Interior (background) of
a cell
Application.Volatile True
CellColorIndex = InRange.Interior.ColorIndex
End Function
But, when she changes the cell color, this function is not recalculating,
unless she specifically tells it to.
I tried putting an Activesheet.usedrange.calculate into the worksheet's
change event, but it appears that a change in a cell's background color
format, does not fire the worksheet change event.
Can someone suggest a good way to make this dynamic, based upon the current
cell color?
Thanks.
Mark
A user wants to sum value based upon cell color background.
I gave her a custom function to do thatm, based upon this:Function CellColorIndex(InRange As Range) As Integer
' This function returns the ColorIndex value of the Interior (background) of
a cell
Application.Volatile True
CellColorIndex = InRange.Interior.ColorIndex
End Function
But, when she changes the cell color, this function is not recalculating,
unless she specifically tells it to.
I tried putting an Activesheet.usedrange.calculate into the worksheet's
change event, but it appears that a change in a cell's background color
format, does not fire the worksheet change event.
Can someone suggest a good way to make this dynamic, based upon the current
cell color?
Thanks.
Mark