Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Mike A.
 
Posts: n/a
Default 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.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Gary''s Student
 
Posts: n/a
Default 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.

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
David McRitchie
 
Posts: n/a
Default 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.



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Cell shading issue on EXCEL 2003 Sue Wiz Excel Discussion (Misc queries) 0 December 14th 05 08:29 PM
Cell shading issue on EXCEL 2003 Sue Wiz Excel Discussion (Misc queries) 0 December 14th 05 07:37 PM
TRYING TO SET UP EXCEL SPREADSHEET ON MY COMPUTER MEGTOM New Users to Excel 5 October 27th 05 03:06 AM
Can I fill colour in a excel cell from a return from an "IF" test. williamw Excel Worksheet Functions 1 March 24th 05 10:31 AM
GET.CELL Biff Excel Worksheet Functions 2 November 24th 04 07:16 PM


All times are GMT +1. The time now is 07:02 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"