Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

COUNTIF() Criteria for EXCEL 2000

Status
Not open for further replies.

stlrain95

Programmer
Sep 21, 2001
224
US
I am needing to count fields if they have a certain condition.

I have the COUNTIF range, but need the criteria.

The criteria I have is purple and bold, how can I do this??

thanks,
 
Please be more specific, give an example of your data
so we can help you find the solution.
Andreas
using xl2000 on win2k
 
You need a UDF:

Enter this into a standard code module:

Function CPAB(Rng As Range)
ctr = 0
For Each c In Rng
If c.Font.ColorIndex = 13 And c.Font.Bold = True Then
ctr = ctr + 1
Else
End If
Next
CPAB = ctr
End Function

Then in a cell, enter
=CPAB(A1:A100)
where A1:A100 holds your cells that may be purple and bold

HTH Rgds
~Geoff~
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top