Counting BOLD text

  • Thread starter Thread starter jake lamotta
  • Start date Start date
J

jake lamotta

Can anyone please advise me how I can count only the "BOLD"" text i
a column??? I cannot sort the column, it will mess up the integrity..
HELP??
 
try

Sub countbold()
For Each c In Selection
If c.Font.Bold = True Then _
boldcount = boldcount + 1
Next
MsgBox boldcount
End Sub
 
I am sorry... I am a novice user and don't understand... is that vb
code??? If so how and where do I enter it?>
 
here's more of what I am looking to do...

Column A has a range of 6 digit numbers in it... some 6 digit cells are
BOLDED and some cells are not... I am looking to have Column B COUNT
the number of bolded 6 digit numbers in Column A???
 
Yes, it is code. The simplest way for you to do this is to
right click on the sheet tab>view code>copy/paste the code>SAVE
To modify as desired use this:

Sub countbold()
For Each c In Selection
if len(c)=6 then _
boldcount = boldcount + 1
Next
MsgBox boldcount
End Sub

or just a formula
=SUMPRODUCT((LEN(A1:A100)=6)*1)
 

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.

Ask a Question

Back
Top