ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Count Bold Text (https://www.excelbanter.com/excel-worksheet-functions/21323-count-bold-text.html)

CheekyChappy

Count Bold Text
 
Hello Office Experts. Does anyone know how to count the number of cells
containing embolldened text in a column? I'm using Excel 2003.

Many thanks.

Nick Hodge

There is no way to do this from the built-in functions. You could use a UDF
such as that below. The function is not volatile so will not update unless
all functions on the worksheet are re-calculated.

Function CountBoldCells(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
CountBoldCells = lCount
End Function

--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
HIS


"CheekyChappy" wrote in message
...
Hello Office Experts. Does anyone know how to count the number of cells
containing embolldened text in a column? I'm using Excel 2003.

Many thanks.




Paul B

Cheeky, Excel does not have a built in formula to do it, you will need to do
with a macro, here is one way

Sub Count_Bold()
' will NOT couunt if bold is by Conditional Formatting
For Each c In Range("A:A")
If c.Font.Bold = True Then _
boldcount = boldcount + 1
Next
MsgBox boldcount
End Sub


--
Paul B
Always backup your data before trying something new
Please post any response to the newsgroups so others can benefit from it
Feedback on answers is always appreciated!
Using Excel 2002 & 2003

"CheekyChappy" wrote in message
...
Hello Office Experts. Does anyone know how to count the number of cells
containing embolldened text in a column? I'm using Excel 2003.

Many thanks.




Myrna Larson

If there's some logical reason why the cells are bold, you could perhaps
incorporate that same logic into a COUNTIF formula or a SUMPRODUCT formula.

On Sat, 9 Apr 2005 18:23:01 -0700, CheekyChappy
wrote:

Hello Office Experts. Does anyone know how to count the number of cells
containing embolldened text in a column? I'm using Excel 2003.

Many thanks.



CheekyChappy

Thanks a lot for your reply Nick, it is much appreciated. I'll give it a go

"Nick Hodge" wrote:

There is no way to do this from the built-in functions. You could use a UDF
such as that below. The function is not volatile so will not update unless
all functions on the worksheet are re-calculated.

Function CountBoldCells(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
CountBoldCells = lCount
End Function

--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
HIS


"CheekyChappy" wrote in message
...
Hello Office Experts. Does anyone know how to count the number of cells
containing embolldened text in a column? I'm using Excel 2003.

Many thanks.





CheekyChappy

Thanks a lot for your response Paul. I'll try it and see what happens.

"Paul B" wrote:

Cheeky, Excel does not have a built in formula to do it, you will need to do
with a macro, here is one way

Sub Count_Bold()
' will NOT couunt if bold is by Conditional Formatting
For Each c In Range("A:A")
If c.Font.Bold = True Then _
boldcount = boldcount + 1
Next
MsgBox boldcount
End Sub


--
Paul B
Always backup your data before trying something new
Please post any response to the newsgroups so others can benefit from it
Feedback on answers is always appreciated!
Using Excel 2002 & 2003

"CheekyChappy" wrote in message
...
Hello Office Experts. Does anyone know how to count the number of cells
containing embolldened text in a column? I'm using Excel 2003.

Many thanks.





CheekyChappy

A VERY BIG thanks to Nick, Paul and Myrna for responding to my cry for help.
I tried Paul's macro version and it worked a treat! I'm sure that Nick's UDF
way of doing it would also work, but I didn't try it as I'm not clever enough
to create/use a user defined function (sorry Nick, I might be cheeky, but
that doesn't mean that I'm bright, but thanks all the same buddY).

"CheekyChappy" wrote:

Hello Office Experts. Does anyone know how to count the number of cells
containing embolldened text in a column? I'm using Excel 2003.

Many thanks.


Todd E

Count Bold Text
 
I hope you're still out there. I have a simple question.

Using the data below, I want to count all the amounts in the column EXCEPT
the ones with 'bold' (which are the ones I have highlighted within the
document-no special formatting used for those).

There are a total of nine, but for the total I want my answer to be six,
because I do not want to count the ones highlighted in bold. If you or anyone
out there have any ideas please respond.

2.00
2.00
0.00 bold
2.00
2.00
2.00
0.00 bold
2.00
0.00 bold

total=6



"Paul B" wrote:

Cheeky, Excel does not have a built in formula to do it, you will need to do
with a macro, here is one way

Sub Count_Bold()
' will NOT couunt if bold is by Conditional Formatting
For Each c In Range("A:A")
If c.Font.Bold = True Then _
boldcount = boldcount + 1
Next
MsgBox boldcount
End Sub


--
Paul B
Always backup your data before trying something new
Please post any response to the newsgroups so others can benefit from it
Feedback on answers is always appreciated!
Using Excel 2002 & 2003

"CheekyChappy" wrote in message
...
Hello Office Experts. Does anyone know how to count the number of cells
containing embolldened text in a column? I'm using Excel 2003.

Many thanks.





Rick Rothstein

Count Bold Text
 
Give this a try...

Sub Count_NonBold()
Dim C As Range
Dim NonBoldCount As Long
For Each C In Range("A1:A" & Cells(Rows.Count, 1).End(xlUp).Row)
NonBoldCount = NonBoldCount - (Not C.Font.Bold And Len(C.Value) 0)
Next
MsgBox NonBoldCount
End Sub

--
Rick (MVP - Excel)


"Todd E" <Todd wrote in message
...
I hope you're still out there. I have a simple question.

Using the data below, I want to count all the amounts in the column EXCEPT
the ones with 'bold' (which are the ones I have highlighted within the
document-no special formatting used for those).

There are a total of nine, but for the total I want my answer to be six,
because I do not want to count the ones highlighted in bold. If you or
anyone
out there have any ideas please respond.

2.00
2.00
0.00 bold
2.00
2.00
2.00
0.00 bold
2.00
0.00 bold

total=6



"Paul B" wrote:

Cheeky, Excel does not have a built in formula to do it, you will need to
do
with a macro, here is one way

Sub Count_Bold()
' will NOT couunt if bold is by Conditional Formatting
For Each c In Range("A:A")
If c.Font.Bold = True Then _
boldcount = boldcount + 1
Next
MsgBox boldcount
End Sub


--
Paul B
Always backup your data before trying something new
Please post any response to the newsgroups so others can benefit from it
Feedback on answers is always appreciated!
Using Excel 2002 & 2003

"CheekyChappy" wrote in message
...
Hello Office Experts. Does anyone know how to count the number of cells
containing embolldened text in a column? I'm using Excel 2003.

Many thanks.







All times are GMT +1. The time now is 04:08 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com