Originally Posted by
Wilburt
I have dates is colum D2:D61. I am using conditional formating to color them. Such as:
=(DATEDIF(D2,$C$77,"m")/12)>0.95
I have it set to fill the cell red.
As inferred by others - if you have logic determining the colour then ape the logic in your count formula - no need for VBA at all.
we're assuming no text values can be added to the range - if they can then an Array would be preferable
Originally Posted by
TMS
...you'd need to make the function volatile so that it responds to changes in the sheet and recalculates.
The precedent ranges are explicit so as they recalculate so too the UDF.
Altering the format of a cell manually (B2) is not a Volatile action so making the UDF volatile would not resolve that issue .. though it would reduce the exposure to error given the UDF would calculate upon the next volatile action irrespective of precedent ranges.
Bookmarks