DrCustUmz
DrCustUmz

Reputation: 388

If cell text equals cell highlight background

Q44840578 example

I am trying to highlight the background of the off days, for each cell I am creating a separate custom formula rule containing:

=IF(TEXT(F6,"dddd")=H4)

just to test it out, but I am unable to get any results.

What am I missing?

Upvotes: 1

Views: 253

Answers (1)

pnuts
pnuts

Reputation: 59460

Assuming G4 and H4 are text (formula would be simpler if a full date formatted as dddd) and that you want both off day columns formatted, please clear any existing CF from C8:I16, select C8:I16 and HOME > Styles - Conditional Formatting, New Rule..., Use a formula to determine which cells to format and Format values where this formula is true::

=OR(LEFT(TEXT(C$7,"ddd"),2)=LEFT($G$4,2),LEFT(TEXT(C$7,"ddd"),2)=LEFT($H$4,2))  

Format..., select choice of formatting, OK, OK.

Note this will override formatting in Rows12:14 which will have to be reset even if applied with CF unless Applies to range for above is changed to:

=$C$8:$I$11,$C$15:$I$16

and existing CF formatting is not cleared first.

OR
LEFT
TEXT

Upvotes: 2

Related Questions