Color format cells based on list in seperate worksheet

B

becksinthecity

I have a list of cells, currently in the range of C2:C24 in the
worksheet 'people'.
What i would like to do is have the cells in the worksheet 'schedule'
change to specific colors should the value in schedule equal a value in
the c2:c24 range of People. Each C# needs to be a different color.

Eg: worksheet: People
c2=qwe
c3=asd
c4=zxc
c5=poi
.....
if a value in schedule =qwe, i'd like it to be orange.
if a value in schedule =asd, i'd like it to be green.
exc...
i know this shouldnt be too hard and i could probably do a macro or
function that can compare the values in Schedule with the list in
People and when it finds a match picks up the formatting specified
(maybe a case statement?)

help/ideas appreciated

:)
 
B

BruceP

You might be able to just use Conditional Formatting for this, under the
condition that you only have 4 conditions (or fewer).

You first need to name the cells containing the account names. Then
your conditional formating would read:

If cell value is equal to =-target name-

You have to use named ranges, because Excel won't allow you to refer
directly to cells in another sheet for conditional formatting.

If you make all your ranged cells the format of one of the 4
conditions, you can then add 3 more conditional formats to those cells,
for a total of 4. If you can't start out with one of the formats, you
can only do 3 conditional formats.

Hope this helps.
 

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