How can I automatically color a cell based upon a condition being

R

RBober2

I am trying to make a spreadsheet that when a numbered cell in one column is
used in a second column, that the cell in the first column becomes filled
with color.

Example: I have cells in Column "A" numbered from 1 to 10. In column "C" I
have cells that can be filled with numbers. When I, for example, put the
number 3 in cell C1, then cell A3 would become colorized. When I, for
example, put then number 1 in cell C5, then cell A1 would become colorized.
etc., etc..

Can anyone help?
 
D

Dave Peterson

I'm using xl2003 menus...

Select A1:A10
With A1 the activecell,
Format|Conditional formatting
Formula is:
=COUNTIF($C$1:$C$10,A1)>0
(Adjust the address for column C to what you want)

Give it a nice pattern under the Format button.
 
R

RBober2

Dave,

Thanks, that worked just the way you said it would. Now can I take it one
step further and have it also colorize the adjacent cell to the one that gets
highlighted due to the conditional formatting? Example as before:

"I have cells in Column "A" numbered from 1 to 10. In column "C" I
have cells that can be filled with numbers. When I, for example, put the
number 3 in cell C1, then cell A3 would become colorized. When I, for
example, put then number 1 in cell C5, then cell A1 would become colorized.
etc., etc.." Now can I have cells A3 and B3 colorize at the same time?

Thanks again for all your help!
 
D

Dave Peterson

Select A1:B10 and with A1 the activecell...

Use this formula:

=COUNTIF($C$1:$C$10,$A1)>0
 
R

RBober2

Dave,

Again I thank you, everything worked perfect. I even expanded it to include
4 columns with the second column being the defined column. I will keep this
knowledge for future projects. Thanks Again---- Robert
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top