Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Rem Excel Macro to
- Rem count number of cells which assigned non-default colors
- Rem ColorIndex for default color is magic number -4142
- Rem
- Rem Reminder: paste this into Worksheet's Module, save as .xls
- Function CountAnyColor(rng)
- CountAnyColor = 0
- For Each c In rng.Cells
- If c.Interior.ColorIndex <> -4142 Then
- CountAnyColor = CountAnyColor + 1
- End If
- Next
- End Function
Add Comment
Please, Sign In to add comment