Count by colour

Ben_UK

Board Regular
Joined
Feb 19, 2003
Messages
206
Hiya Board,

Column C on my sheet contains a 3 digit number between 101 - 999,
Those cells are conditional formatted so that any entry over 750 turns the font Red,

Is it possible to automatically count how many entries in col C are red

Any help would be greatly appreciated,

Kind Regards

Ben
 

Excel Facts

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.
Sorry,

I was just using that as an example (to keep the question simple)

Forget the numbers...
Basically I am looking for operator input errors in column C,
So I am purely looking to count cells that contain red font,

Apologies for the misleading question :oops:

Kind Regards

Ben
 
Upvote 0
An alternate solution to the one north19701 provided at Chip Pearsons site

Rich (BB code):
Function CountColor(rColor As Range, rSumRange As Range)

''''''''''''''''''''''''''''''''''''''
' Written by Ozgrid Business Applications
' www.ozgrid.com
' http://www.ozgrid.com/VBA/Sum.htm
' Counts cells based on a specified fill color.
'''''''''''''''''''''''''''''''''''''''
Dim rCell As Range
Dim iCol As Integer
Dim vResult

iCol = rColor.Interior.ColorIndex

   For Each rCell In rSumRange
    If rCell.Interior.ColorIndex = iCol Then
         vResult = vResult + 1
    End If
   Next rCell

CountColor = vResult
End Function

HTH
 
Upvote 0

Forum statistics

Threads
1,214,413
Messages
6,119,372
Members
448,888
Latest member
Arle8907

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top