OK, here's one, glad you know VBA!
Public Function mycount(oColourToLookFor As Range, oRangeToSearch As Range)
Dim oCell As Range
Dim iFound As Long
iFound = 0
For Each oCell In oRangeToSearch
If oCell.Interior.ColorIndex = oColourToLookFor.Interior.ColorIndex Then
iFound = iFound + 1
End If
Next
mycount = iFound
End Function
Basically you point it at the colour you want to look for (i'd put this say next to your key and point it at each one -ie repeat the call for each one, and point it at the range you want to search (i.e. a single column of those resuls)
__________________
Current: E90 335d (May 2007) | Black/Black | Prof Hifi | Prof Nav | 6FL | Fully Electric Seats | Xenons | Folding Mirrors | PDC
Previous: 325ci Conv. Black/Black with lots of ACS
Previous: z3 3.0 Silver with Black&Red Leather
|