close

Hi. I want to be able to test a cell to see if the contents are bold. Is
there a way to do this in Excel, or must I write a VB function? Thanks.

The VB part is easy:

Function bold_test(r As Range) As String
If r.Font.FontStyle = quot;Boldquot; Then
bold_test = quot;Boldquot;
Else
bold_test = quot;not Boldquot;
End If
End Function

The hard part is that the function does not automatically update if you
change the target's boldness. If you change the target from bold to not bold
or visa versa, you must touch CNTRL-ALT-F9 to re-calculate the function.
--
Gary''s Studentquot;Mike A.quot; wrote:

gt; Hi. I want to be able to test a cell to see if the contents are bold. Is
gt; there a way to do this in Excel, or must I write a VB function? Thanks.

Hi Mike,
You would need to write a User Defined Function
ISBOLD User Defined Function
www.mvps.org/dmcritchie/excel/font.htm#ISBOLD

though because of Firefox it will be #isbold in the future.

wasn't hard to find my page using Google
---
HTH,
David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001]
My Excel Pages: www.mvps.org/dmcritchie/excel/excel.htm
Search Page: www.mvps.org/dmcritchie/excel/search.htm

quot;Mike A.quot; lt;Mike gt; wrote in message ...
gt; Hi. I want to be able to test a cell to see if the contents are bold. Is
gt; there a way to do this in Excel, or must I write a VB function? Thanks.

arrow
arrow
    全站熱搜
    創作者介紹
    創作者 software 的頭像
    software

    software

    software 發表在 痞客邦 留言(0) 人氣()