Search code examples
exceldatetimeexcel-formulaworksheet-functionconditional-formatting

Conditionally format one cell based on values in a column


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.

enter image description here

Any idea how to do this?


Solution

  • 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.