+ Reply to Thread
Results 1 to 3 of 3

How can i test a cell for bold style in a cell (Excel 2003)?

  1. #1
    Mike A.
    Guest

    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. #2
    Gary''s Student
    Guest

    RE: 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. #3
    David McRitchie
    Guest

    Re: 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 [email protected]> wrote in message news:[email protected]...
    > 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 to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1