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
You need a simple UDF
Function ColorIndex(rng As Range)
If rng.Cells.Count gt; 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,quot;YESquot;,quot;quot;)
--
HTH
Bob Phillips
(remove xxx from email address if mailing direct)
quot;cdbquot; gt; wrote in message
...
gt; I have a spreadsheet that has been partially filled by someone else. They
gt; have filled in all cells relating to a certain condition with the
background
gt; colour of yellow. Unfortunately this is the only indicator he has used,
and I
gt; now need to filter based on the colour selection.
gt;
gt; What I am wanting to do is enter a value in a cell dependant on the colour
gt; of a different cell. What I mean by this is that if the background colour
of
gt; B2 is yellow, put YES in A2 and so on down the rows.
gt;
gt; Can anyone offer me some advice on this?
gt;
gt; Cheers,
gt;
gt; cdb
cdb wrote:
gt; I have a spreadsheet that has been partially filled by someone else.
gt; They have filled in all cells relating to a certain condition with
gt; the background colour of yellow. Unfortunately this is the only
gt; indicator he has used, and I now need to filter based on the colour
gt; selection.
gt;
gt; What I am wanting to do is enter a value in a cell dependant on the
gt; colour of a different cell. What I mean by this is that if the
gt; background colour of B2 is yellow, put YES in A2 and so on down the
gt; rows.
gt;
gt; Can anyone offer me some advice on this?
gt;
gt; Cheers,
gt;
gt; cdb
I typed excel filter cell color into google and found this link on the first
page:
support.microsoft.com/Default.aspx?kbid=213923
Cheers,
Thanks for the help.
quot;Bob Phillipsquot; wrote:
gt; You need a simple UDF
gt;
gt; Function ColorIndex(rng As Range)
gt; If rng.Cells.Count gt; 1 Then
gt; ColorIndex = CVErr(xlErrRef)
gt; Else
gt; ColorIndex = rng.Interior.ColorIndex
gt; End If
gt; End Function
gt;
gt; and use that in the worksheet like so
gt;
gt; =If(ColorIndex(B2)=6,quot;YESquot;,quot;quot;)
gt;
gt; --
gt; HTH
gt;
gt; Bob Phillips
gt;
gt; (remove xxx from email address if mailing direct)
gt;
gt; quot;cdbquot; gt; wrote in message
gt; ...
gt; gt; I have a spreadsheet that has been partially filled by someone else. They
gt; gt; have filled in all cells relating to a certain condition with the
gt; background
gt; gt; colour of yellow. Unfortunately this is the only indicator he has used,
gt; and I
gt; gt; now need to filter based on the colour selection.
gt; gt;
gt; gt; What I am wanting to do is enter a value in a cell dependant on the colour
gt; gt; of a different cell. What I mean by this is that if the background colour
gt; of
gt; gt; B2 is yellow, put YES in A2 and so on down the rows.
gt; gt;
gt; gt; Can anyone offer me some advice on this?
gt; gt;
gt; gt; Cheers,
gt; gt;
gt; gt; cdb
gt;
gt;
gt;
Thanks for the help
quot;Paul Lautmanquot; wrote:
gt; cdb wrote:
gt; gt; I have a spreadsheet that has been partially filled by someone else.
gt; gt; They have filled in all cells relating to a certain condition with
gt; gt; the background colour of yellow. Unfortunately this is the only
gt; gt; indicator he has used, and I now need to filter based on the colour
gt; gt; selection.
gt; gt;
gt; gt; What I am wanting to do is enter a value in a cell dependant on the
gt; gt; colour of a different cell. What I mean by this is that if the
gt; gt; background colour of B2 is yellow, put YES in A2 and so on down the
gt; gt; rows.
gt; gt;
gt; gt; Can anyone offer me some advice on this?
gt; gt;
gt; gt; Cheers,
gt; gt;
gt; gt; cdb
gt;
gt; I typed excel filter cell color into google and found this link on the first
gt; page:
gt; support.microsoft.com/Default.aspx?kbid=213923
gt;
gt;
gt;
- Oct 05 Fri 2007 20:39
Enter a value dependant on the colour of a cell
close
全站熱搜
留言列表
發表留言