count formatted text

  • Thread starter Thread starter rvik
  • Start date Start date
R

rvik

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

any help appreciated
 
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)
 
Back
Top