Calculate number of cells colored red
Closed
Spense
-
Oct 28, 2009 at 07:19 PM
venkat1926 Posts 1863 Registration date Sunday June 14, 2009 Status Contributor Last seen August 7, 2021 - Oct 28, 2009 at 09:37 PM
venkat1926 Posts 1863 Registration date Sunday June 14, 2009 Status Contributor Last seen August 7, 2021 - Oct 28, 2009 at 09:37 PM
Related:
- Calculate number of cells colored red
- Pokemon fire red cheats - Guide
- Pokemon fire red rom - Download - Role playing
- Red dead redemption 2 free download - Download - Action and adventure
- Pcdj red - Download - Audio playback
- Hp desktop red light flashing 4 times - Hardware Forum
1 response
venkat1926
Posts
1863
Registration date
Sunday June 14, 2009
Status
Contributor
Last seen
August 7, 2021
811
Oct 28, 2009 at 09:37 PM
Oct 28, 2009 at 09:37 PM
try this macro
Sub test() Dim r As Range, c As Range, j As Integer, m As Integer Set r = Range(Range("A1"), Range("A1").End(xlDown)) For Each c In r If c.Interior.ColorIndex <> -4142 Then j = c.Interior.ColorIndex MsgBox j GoTo exitloop End If Next c exitloop: m = 0 For Each c In r If c.Interior.ColorIndex = j Then m = m + 1 Next c MsgBox "count of cell in color " & j & " is " & m End Sub