View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
John Bundy John Bundy is offline
external usenet poster
 
Posts: 772
Default Logical test if cell uses formatting..

As far as I know there is nothing built in, I built this function for someone
that counts cells that are bold, you can use it or modify, I can help you
modify it to your purpose if you need to. It goes in a module, preferably in
your personal.xls.

Function CountBold(rRange As Range) As Long
Dim lCount As Long, myCell As Range
lCount = 0
For Each myCell In rRange
If myCell.Font.bold = True Then
lCount = lCount + 1
End If
Next myCell
CountBold = lCount
End Function
--
-John
Please rate when your question is answered to help us and others know what
is helpful.


"Mac" wrote:

Is there a logical test to check if, for example, a cell contents is in bold?