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.
- Sep 29 Fri 2006 20:09
How can i test a cell for bold style in a cell (Excel 2003)?
close
全站熱搜
留言列表
發表留言