Hi
So some of the excel wizards on here have created some coding for me to count coloured cells from conditional formatting however I have just realised that I can not undo anything because of this!
I'm not sure whether it is the following module:
Thanks![]()
Function ColorFunction(rColor As Range, rRange As Range, Optional SUM As Boolean) Dim rCell As Range Dim lCol As Long Dim vResult lCol = rColor.DisplayFormat.Interior.ColorIndex If SUM = True Then For Each rCell In rRange If rCell.DisplayFormat.Interior.ColorIndex = lCol Then vResult = WorksheetFunction.SUM(rCell, vResult) End If Next rCell Else For Each rCell In rRange If rCell.DisplayFormat.Interior.ColorIndex = lCol Then vResult = 1 + vResult End If Next rCell End If ColorFunction = vResult End Function











LinkBack URL
About LinkBacks
Register To Reply


this way I can still undo any changes unless I press the button to update the values which is fine as the whole workbook is massive with around 30 tabs which is updated by many different people who will not be using this feature anyway 
Bookmarks