Hi,
I have a range of cells that have conditional formats to change their colour.
I want to count the number of yellow cells within the range. Can anyone help?
(It's the bright yellow from the colour pallet).
Thanks
Hi,
I have a range of cells that have conditional formats to change their colour.
I want to count the number of yellow cells within the range. Can anyone help?
(It's the bright yellow from the colour pallet).
Thanks
Last edited by singerbatfink; 01-25-2012 at 06:24 AM.
Called with![]()
Function CountYellow(rng As Range) As Integer Dim oCell As Range For Each oCell In rng If oCell.Interior.Color = vbYellow Then CountYellow = CountYellow + 1 Next oCell End Function
PHP Code:
=CountYellow(A1:B20)
Actually, that's not going to work for conditional formatting, I'll post back
EDIT: Can't you use a formula based on the condition to count the number of times it has/hasn't been met? That would be much faster than trying to work with colours
Hi
Yes, You can get counts by using the formula used in conditional formating
Upload a sample sheet.
See attached for a simple example
Regards
Mark the thread as solved if you are satisfied with the answer.
In your first post under the thread tools.
Mahju
Thanks very much everyone.. Worked for me.
Cheers.
Good Joke Not !
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks