+ Reply to Thread
Results 1 to 4 of 4

Interior Cell Colour - Conditional Formatting

  1. #1
    Registered User
    Join Date
    03-31-2006
    Posts
    27

    Interior Cell Colour - Conditional Formatting

    I have the following UDF that returns the interior cell colour value of a cell:
    Function InteriorColor(CellColor As Range)
    Application.Volatile
    InteriorColor = CellColor.Interior.ColorIndex
    End Function

    However, when I use it on a cell that has conditional formatting - and the formatting is being applied - the result is not the interior color value of the conditional format.

    Does anyone know of a UDF that will recognise when a cell has conditional formatting and give the interior cell colour if the formatting is being applied?

    Many Thanks.

  2. #2
    Tim Williams
    Guest

    Re: Interior Cell Colour - Conditional Formatting

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

    Tim

    "michael.a7" <[email protected]> wrote in message
    news:[email protected]...
    >
    > I have the following UDF that returns the interior cell colour value of
    > a cell:
    > Function InteriorColor(CellColor As Range)
    > Application.Volatile
    > InteriorColor = CellColor.Interior.ColorIndex
    > End Function
    >
    > However, when I use it on a cell that has conditional formatting - and
    > the formatting is being applied - the result is not the interior color
    > value of the conditional format.
    >
    > Does anyone know of a UDF that will recognise when a cell has
    > conditional formatting and give the interior cell colour if the
    > formatting is being applied?
    >
    > Many Thanks.
    >
    >
    > --
    > michael.a7
    > ------------------------------------------------------------------------
    > michael.a7's Profile: http://www.excelforum.com/member.php...o&userid=33027
    > View this thread: http://www.excelforum.com/showthread...hreadid=535376
    >




  3. #3
    Gary''s Student
    Guest

    RE: Interior Cell Colour - Conditional Formatting

    The easiest way is to replicate the same formula that the cell uses for its
    conditional formatting.
    --
    Gary''s Student


    "michael.a7" wrote:

    >
    > I have the following UDF that returns the interior cell colour value of
    > a cell:
    > Function InteriorColor(CellColor As Range)
    > Application.Volatile
    > InteriorColor = CellColor.Interior.ColorIndex
    > End Function
    >
    > However, when I use it on a cell that has conditional formatting - and
    > the formatting is being applied - the result is not the interior color
    > value of the conditional format.
    >
    > Does anyone know of a UDF that will recognise when a cell has
    > conditional formatting and give the interior cell colour if the
    > formatting is being applied?
    >
    > Many Thanks.
    >
    >
    > --
    > michael.a7
    > ------------------------------------------------------------------------
    > michael.a7's Profile: http://www.excelforum.com/member.php...o&userid=33027
    > View this thread: http://www.excelforum.com/showthread...hreadid=535376
    >
    >


  4. #4
    Bob Phillips
    Guest

    Re: Interior Cell Colour - Conditional Formatting

    See http://www.xldynamic.com/source/xld.CFConditions.html

    --
    HTH

    Bob Phillips

    (remove nothere from email address if mailing direct)

    "michael.a7" <[email protected]> wrote
    in message news:[email protected]...
    >
    > I have the following UDF that returns the interior cell colour value of
    > a cell:
    > Function InteriorColor(CellColor As Range)
    > Application.Volatile
    > InteriorColor = CellColor.Interior.ColorIndex
    > End Function
    >
    > However, when I use it on a cell that has conditional formatting - and
    > the formatting is being applied - the result is not the interior color
    > value of the conditional format.
    >
    > Does anyone know of a UDF that will recognise when a cell has
    > conditional formatting and give the interior cell colour if the
    > formatting is being applied?
    >
    > Many Thanks.
    >
    >
    > --
    > michael.a7
    > ------------------------------------------------------------------------
    > michael.a7's Profile:

    http://www.excelforum.com/member.php...o&userid=33027
    > View this thread: http://www.excelforum.com/showthread...hreadid=535376
    >




+ 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