Forum Discussion
brendababy02
Aug 16, 2021Copper Contributor
Nested AND OR
=IF(AND(OR(K2<=TODAY,L2=Y)),(OR(P2<=TODAY,Q2=Y))) I am trying to get the row to highlight if either (K2 or L2 is True) AND (P2 or Q2 is True) Date in K2 is equal to or less t...
- Aug 16, 2021
Try it this way:
=AND(OR($K2<=TODAY(),$L2="Y"),OR($P2<=TODAY(),$Q2="Y"))
You don't need the IF, the correct syntax for the TODAY function is to add the two brackets, and when you compare to a text you must enclose the text in quotation marks. And finally, you need to fix the column references with a $ sign.
Riny_van_Eekelen
Aug 16, 2021Platinum Contributor
Try it this way:
=AND(OR($K2<=TODAY(),$L2="Y"),OR($P2<=TODAY(),$Q2="Y"))
You don't need the IF, the correct syntax for the TODAY function is to add the two brackets, and when you compare to a text you must enclose the text in quotation marks. And finally, you need to fix the column references with a $ sign.