+ Reply to Thread
Results 1 to 5 of 5

Enter a value dependant on the colour of a cell

  1. #1
    cdb
    Guest

    Enter a value dependant on the colour of a cell

    I have a spreadsheet that has been partially filled by someone else. They
    have filled in all cells relating to a certain condition with the background
    colour of yellow. Unfortunately this is the only indicator he has used, and I
    now need to filter based on the colour selection.

    What I am wanting to do is enter a value in a cell dependant on the colour
    of a different cell. What I mean by this is that if the background colour of
    B2 is yellow, put YES in A2 and so on down the rows.

    Can anyone offer me some advice on this?

    Cheers,

    cdb

  2. #2
    Bob Phillips
    Guest

    Re: Enter a value dependant on the colour of a cell

    You need a simple UDF

    Function ColorIndex(rng As Range)
    If rng.Cells.Count > 1 Then
    ColorIndex = CVErr(xlErrRef)
    Else
    ColorIndex = rng.Interior.ColorIndex
    End If
    End Function

    and use that in the worksheet like so

    =If(ColorIndex(B2)=6,"YES","")

    --
    HTH

    Bob Phillips

    (remove xxx from email address if mailing direct)

    "cdb" <[email protected]> wrote in message
    news:[email protected]...
    > I have a spreadsheet that has been partially filled by someone else. They
    > have filled in all cells relating to a certain condition with the

    background
    > colour of yellow. Unfortunately this is the only indicator he has used,

    and I
    > now need to filter based on the colour selection.
    >
    > What I am wanting to do is enter a value in a cell dependant on the colour
    > of a different cell. What I mean by this is that if the background colour

    of
    > B2 is yellow, put YES in A2 and so on down the rows.
    >
    > Can anyone offer me some advice on this?
    >
    > Cheers,
    >
    > cdb




  3. #3
    Paul Lautman
    Guest

    Re: Enter a value dependant on the colour of a cell

    cdb wrote:
    > I have a spreadsheet that has been partially filled by someone else.
    > They have filled in all cells relating to a certain condition with
    > the background colour of yellow. Unfortunately this is the only
    > indicator he has used, and I now need to filter based on the colour
    > selection.
    >
    > What I am wanting to do is enter a value in a cell dependant on the
    > colour of a different cell. What I mean by this is that if the
    > background colour of B2 is yellow, put YES in A2 and so on down the
    > rows.
    >
    > Can anyone offer me some advice on this?
    >
    > Cheers,
    >
    > cdb


    I typed excel filter cell color into google and found this link on the first
    page:
    http://support.microsoft.com/Default.aspx?kbid=213923



  4. #4
    cdb
    Guest

    Re: Enter a value dependant on the colour of a cell

    Cheers,

    Thanks for the help.

    "Bob Phillips" wrote:

    > You need a simple UDF
    >
    > Function ColorIndex(rng As Range)
    > If rng.Cells.Count > 1 Then
    > ColorIndex = CVErr(xlErrRef)
    > Else
    > ColorIndex = rng.Interior.ColorIndex
    > End If
    > End Function
    >
    > and use that in the worksheet like so
    >
    > =If(ColorIndex(B2)=6,"YES","")
    >
    > --
    > HTH
    >
    > Bob Phillips
    >
    > (remove xxx from email address if mailing direct)
    >
    > "cdb" <[email protected]> wrote in message
    > news:[email protected]...
    > > I have a spreadsheet that has been partially filled by someone else. They
    > > have filled in all cells relating to a certain condition with the

    > background
    > > colour of yellow. Unfortunately this is the only indicator he has used,

    > and I
    > > now need to filter based on the colour selection.
    > >
    > > What I am wanting to do is enter a value in a cell dependant on the colour
    > > of a different cell. What I mean by this is that if the background colour

    > of
    > > B2 is yellow, put YES in A2 and so on down the rows.
    > >
    > > Can anyone offer me some advice on this?
    > >
    > > Cheers,
    > >
    > > cdb

    >
    >
    >


  5. #5
    cdb
    Guest

    Re: Enter a value dependant on the colour of a cell

    Thanks for the help

    "Paul Lautman" wrote:

    > cdb wrote:
    > > I have a spreadsheet that has been partially filled by someone else.
    > > They have filled in all cells relating to a certain condition with
    > > the background colour of yellow. Unfortunately this is the only
    > > indicator he has used, and I now need to filter based on the colour
    > > selection.
    > >
    > > What I am wanting to do is enter a value in a cell dependant on the
    > > colour of a different cell. What I mean by this is that if the
    > > background colour of B2 is yellow, put YES in A2 and so on down the
    > > rows.
    > >
    > > Can anyone offer me some advice on this?
    > >
    > > Cheers,
    > >
    > > cdb

    >
    > I typed excel filter cell color into google and found this link on the first
    > page:
    > http://support.microsoft.com/Default.aspx?kbid=213923
    >
    >
    >


+ 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