![]() |
How can i test a cell for bold style in a cell (Excel 2003)?
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. |
How can i test a cell for bold style in a cell (Excel 2003)?
The VB part is easy:
Function bold_test(r As Range) As String If r.Font.FontStyle = "Bold" Then bold_test = "Bold" Else bold_test = "not Bold" 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 Student "Mike A." wrote: 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. |
How can i test a cell for bold style in a cell (Excel 2003)?
Hi Mike,
You would need to write a User Defined Function ISBOLD User Defined Function http://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: http://www.mvps.org/dmcritchie/excel/excel.htm Search Page: http://www.mvps.org/dmcritchie/excel/search.htm "Mike A." <Mike wrote in message ... 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. |
All times are GMT +1. The time now is 02:49 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com