Reputation: 35
The user enters a date/time into cell B2. If this matches one of the values in column L I would like to format cell B2 as red, else format cell B2 as green.
Any idea how to do this?
Upvotes: 3
Views: 598
Reputation: 20473
What about breaking this up into two steps.
Try putting a simple formula in Cell B1
:
=ISNUMBER(MATCH(B2, L:L, 0))
This will return a TRUE
if there's a match and a FALSE
if there is not a match. Then make two conditional rules based on Cell B1
.
Upvotes: 1
Reputation: 19574
Assuming you are using Excel 2007 onwards:
Conditional Formatting
> New Rule
menu itemUse a formula to determine which cells to format
=ISNUMBER(MATCH(B2,$L$6:$L$100,0))
Obviously change the $L$6:$L$100
to suit you, but that should do it...
Upvotes: 1
Reputation: 59485
Please format B2 green with standard fill, then apply the following Use a formula to determine which cells to format, Format values where this formula is true:
=match(B2,L:L,0)>0
with formatting (red) to suit and Applies to B2.
Upvotes: 3