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

Who is Mr Spreadsheet?
Author John Walkenbach was Mr Spreadsheet until his retirement in June 2019.

Ben_UK

Board Regular
Joined
Feb 19, 2003
Messages
206
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
 

Iridium

Well-known Member
Joined
Jul 15, 2002
Messages
2,831
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
 
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,151,891
Messages
5,766,966
Members
425,391
Latest member
Alono23

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
Top