+ Reply to Thread
Results 1 to 3 of 3

If formulae using formats

  1. #1
    Paul
    Guest

    If formulae using formats

    Hi,
    I want to write a formula along the lines of:

    =if( b2 is bold, b2, else "")

    Any ideas would be welcome.

    PS the Excel is 2002.
    Thanks for looking

    Paul

  2. #2
    Bob Phillips
    Guest

    Re: If formulae using formats

    Paul,

    You could add a UDF like so

    '-----------------------------------------------------------------
    Function IsBold(rng As Range)
    '-----------------------------------------------------------------
    If rng.Areas.Count > 1 Then
    IsBold = CVErr(xlErrValue)
    Exit Function
    ElseIf rng.Cells.Count > 1 Then
    IsBold = CVErr(xlErrValue)
    Exit Function
    Else
    IsBold = rng.Font.Bold
    End If

    End Function


    and then use

    =IF(IsBold(B2),B2,"")

    but be aware that bold does not trigger the calculate event so if B2 is
    changed, you formula will not update.

    --

    HTH

    RP
    (remove nothere from the email address if mailing direct)


    "Paul" <[email protected]> wrote in message
    news:[email protected]...
    > Hi,
    > I want to write a formula along the lines of:
    >
    > =if( b2 is bold, b2, else "")
    >
    > Any ideas would be welcome.
    >
    > PS the Excel is 2002.
    > Thanks for looking
    >
    > Paul




  3. #3
    CLR
    Guest

    Re: If formulae using formats

    If B2 is BOLD because of Conditional Formatting, then just replace the "B2
    is bold" in your formula with whatever conditions actually make B2
    BOLD.........but the BOLD will not carry through to your new result just
    using a formula............also, you do not need the "else" in your
    formula..........

    Vaya con Dios,
    Chuck, CABGx3


    "Paul" <[email protected]> wrote in message
    news:[email protected]...
    > Hi,
    > I want to write a formula along the lines of:
    >
    > =if( b2 is bold, b2, else "")
    >
    > Any ideas would be welcome.
    >
    > PS the Excel is 2002.
    > Thanks for looking
    >
    > Paul




+ 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