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
Note that changing the formatting within rRange doesn't cause this to
recalculate. You could add
Application.Volatile
after the Dim statement, but you'd still need to manually calculate the
sheet to ensure that the result is correct.
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.