Excel help please - formatting a cell based on two other cells

Soldato
Joined
17 Jan 2006
Posts
4,313
Hi

I'm trying to put together a fairly simple spreadsheet to keep track on the criteria I have achieved on my college course and want to be able to have a visual reference to make things easier as I need to achieve each one twice.

So far i have a list of the criteria and next to each I have two columns, which represent me having achieved the criteria once and then twice which works fine.

However for the visual reference I would like to have a cell for each criteria and have it formatted yellow if I have achieved it once and green if I've got it twice. I've worked out a way to do this using two formatting rules one OR rule which fills the cell yellow if I've filled in either of the two cells in the criteria list and an AND rule which fills the cell green if I have filled in both cells in the criteria list. This can be seen in the screen shot below

Achieved once

u5QNuAw.jpg


Achieved twice

IO9iU2l.jpg



I could individually create the two rules for each individual criteria in the top section but that would take ages and I wondered if there was an easier way, or if I could achieve the same using a single formula which would halve the amount of rules I'd need to create? Is there some kind If/Then rule I could create so If one of the criteria columns was filled in then format yellow and if both then format green?

Any help would really be appreciated.
 
It's not pretty but try this

Yellow rule:
Code:
=not(isblank(
XLOOKUP(B3,$B$10:$B$29,$C$10:$C$29,
XLOOKUP(B3,$I$10:$I$29,$J$10:$J$29,
XLOOKUP(B3,$P$10:$P$29,$Q$10:$Q$29,
XLOOKUP(B3,$W$10:$W$29,$X$10:$X$29,":"))))))


Green rule:
Code:
=not(isblank(
XLOOKUP(B3,$B$10:$B$29,$D$10:$D$29,
XLOOKUP(B3,$I$10:$I$29,$K$10:$K$29,
XLOOKUP(B3,$P$10:$P$29,$R$10:$R$29,
XLOOKUP(B3,$W$10:$W$29,$Y$10:$Y$29,":"))))))

The line breaks are to help make it readable, you'll need to get rid of them when you paste it into the conditional formatting box.
 
For rows 3 to 7 why cant you just colour them cells yellow or green and that's the visual indicator?
 
Back
Top Bottom