Home |
Search |
Today's Posts |
|
#1
![]() |
|||
|
|||
![]()
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
![]() |
|||
|
|||
![]()
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
![]() |
|||
|
|||
![]()
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
![]() |
|||
|
|||
![]()
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
![]() |
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
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
![]() |
|||
|
|||
![]()
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
![]() |
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
count text | Excel Discussion (Misc queries) | |||
Count the text in a column - Part II | Excel Discussion (Misc queries) | |||
Count Occourences of formatted text | Excel Discussion (Misc queries) | |||
want if cell containts text, then increase count by one | Excel Worksheet Functions | |||
how do I 'count' the number of cells with a text in red or black? | Excel Worksheet Functions |