#1   Report Post  
CheekyChappy
 
Posts: n/a
Default 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.
  #2   Report Post  
Nick Hodge
 
Posts: n/a
Default

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.



  #3   Report Post  
CheekyChappy
 
Posts: n/a
Default

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.




  #4   Report Post  
Paul B
 
Posts: n/a
Default

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.



  #5   Report Post  
CheekyChappy
 
Posts: n/a
Default

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.






  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default 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.




  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5,934
Default 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.





  #8   Report Post  
Myrna Larson
 
Posts: n/a
Default

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.


  #9   Report Post  
CheekyChappy
 
Posts: n/a
Default

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.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
count text Dr. Sachin Wagh Excel Discussion (Misc queries) 4 March 8th 05 09:34 AM
Count the text in a column - Part II Peter Curtis Excel Discussion (Misc queries) 3 January 6th 05 06:58 PM
Count Occourences of formatted text Adam Excel Discussion (Misc queries) 1 December 20th 04 06:17 PM
want if cell containts text, then increase count by one lsundae Excel Worksheet Functions 4 November 18th 04 02:11 PM
how do I 'count' the number of cells with a text in red or black? Anjin Topeng Excel Worksheet Functions 2 November 4th 04 06:42 AM


All times are GMT +1. The time now is 11:06 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"