Hi,
I have sheet will different colour in different cells. Say if i want to count how many yellow coloured cells are there what is the formula ?
thanks
Hi,
I have sheet will different colour in different cells. Say if i want to count how many yellow coloured cells are there what is the formula ?
thanks
Play around with this macro. It will check for red cells in the first 40 rows and 40 columns.
Obviously, you can add more checks in the IF statement, for other colors.
![]()
For Row = 1 To 40 ' <---- change as needed For Column = 1 To 40 ' <---- change as needed If Cells(Row, Column).Interior.Color = RGB(255, 0, 0) Then red = red + 1 End If Next Next MsgBox$ "You've got " & red & " red colored cells!"
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks