Thread: [Solved] Count By Color
View Single Post
 
Old 06-15-2011, 08:27 AM
Colin Legg's Avatar
Colin Legg Colin Legg is offline Windows 7 32bit Office 2010 32bit
Expert
 
Join Date: Jan 2011
Location: UK
Posts: 369
Colin Legg will become famous soon enough
Default

Hi,

I'll explain the problem(s) with counting by colours.

Excel 2007 does not have a built-in worksheet function which can count by colour. This means that you would have to write a custom VBA function (this is called a "UDF") to do it. Even then, the UDF wouldn't automatically recalculate when the colour of a cell changes because changing the colour of a cell doesn't trigger a calculation event. This solution isn't very good.

If the colour of the cell is determined by the name of a person then you should aim to count by name rather than by colour. You can do this using COUNTIF() or you could even use a pivot table.
Reply With Quote