+ Reply to Thread
Results 1 to 5 of 5

Detect Colours

  1. #1
    Registered User
    Join Date
    01-18-2005
    Location
    Australia
    Posts
    29

    Detect Colours

    Hi

    A Colleague has just asked me if there is any way, without using VB to detect font colours by using an IF statement formula.

    ie. He has created a sheet that if a user changes a cell then the cell that is changed turns red. He would like to detect this change by using a formula.

    I suspect this is not possible but if it is could somebody please pass on an example?

    Thanks in advance
    Shaun

  2. #2
    Dave Peterson
    Guest

    Re: Detect Colours

    Even using VBA, it can get ugly pretty fast.

    Any chance your colleague could mimic the conditional formatting in another
    cell?

    ShaunM wrote:
    >
    > Hi
    >
    > A Colleague has just asked me if there is any way, without using VB to
    > detect font colours by using an IF statement formula.
    >
    > ie. He has created a sheet that if a user changes a cell then the cell
    > that is changed turns red. He would like to detect this change by using
    > a formula.
    >
    > I suspect this is not possible but if it is could somebody please pass
    > on an example?
    >
    > Thanks in advance
    > Shaun
    >
    > --
    > ShaunM
    > ------------------------------------------------------------------------
    > ShaunM's Profile: http://www.excelforum.com/member.php...o&userid=18610
    > View this thread: http://www.excelforum.com/showthread...hreadid=381460


    --

    Dave Peterson

  3. #3
    Registered User
    Join Date
    06-21-2005
    Posts
    19
    Not sure why you can't accept VBA, but if you can persuade your friend, then:

    Add a module

    Paste in

    '---------------------------------
    Public Function Cula(Sel As Excel.Range)
    Cula = Sel.Font.Color
    End Function
    '----------------------------------

    in the cell use the formula

    =IF(Cula(A1)=255,"Red","Not Red")

    Come on, Dave, it's not *that* ugly :-)

    Gaz
    2B OR NOT 2B, that is FF

  4. #4
    aaron.kempf@gmail.com
    Guest

    Re: Detect Colours

    can't you just do conditional formatting?


  5. #5
    Dave Peterson
    Guest

    Re: Detect Colours

    This doesn't return the color based on conditional formatting.

    But if the OP wants to return the color based on formatting--not conditional
    formatting, Chip Pearson has another version at:

    http://www.cpearson.com/excel/colors.htm
    (Look for: Returning The ColorIndex Of A Cell)

    But if you really want to return the color based on conditional formatting, take
    a look at Chip's page:

    http://www.cpearson.com/excel/CFColors.htm

    (Which is not for the faint of heart--at least when I look at it!)

    ===
    I was guessing that the OP had used conditional formatting for that cell. I may
    have misinterpreted the question.


    gazornenplat wrote:
    >
    > Not sure why you can't accept VBA, but if you can persuade your friend,
    > then:
    >
    > Add a module
    >
    > Paste in
    >
    > '---------------------------------
    > Public Function Cula(Sel As Excel.Range)
    > Cula = Sel.Font.Color
    > End Function
    > '----------------------------------
    >
    > in the cell use the formula
    >
    > =IF(Cula(A1)=255,"Red","Not Red")
    >
    > Come on, Dave, it's not *that* ugly :-)
    >
    > Gaz
    >
    > --
    > gazornenplat
    >
    > ------------------------------------------------------------------------
    > gazornenplat's Profile: http://www.excelforum.com/member.php...o&userid=24494
    > View this thread: http://www.excelforum.com/showthread...hreadid=381460


    --

    Dave Peterson

+ 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