count formatted text

R

rvik

i have text as bold and unbolded, in various cells. i would like t
count the bold text.

any help appreciated
 
F

Frank abel

Hi
try the following user defined function

public Function Count_Bold(rng as range)
Dim ret_value
Dim cell as range
For each cell in rng
If cell.font.bold then
If cell.value<>"" then
ret_value = ret_value + 1
end if
end if
next
Count_Bold = ret_value
end Function

Now use this function like
=COUNT_BOLD(A1:A30)
 

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

Top