Conditional Formatting with nested IF, OR & AND

tammorice

New Member
Joined
Oct 13, 2015
Messages
23
Hi everyone. I am trying to format a cell based on a couple of conditions.

$N13= formatted when
1. $C13="CharterB" OR "CharterKP" AND
2. $F13 < 04:00 OR $F13 > 22:00

This is what I have tried, but it is formatting everything with $C13= CharterB or CharterKP and not just when the hours = those at point 2 above.

=IF(AND(OR($F13>"22:00",$F13<"04:00")),(AND(OR($C13="CharterB",$C13="CharterKP")))

Thanks for your help.
Tam

 

Excel Facts

Last used cell?
Press Ctrl+End to move to what Excel thinks is the last used cell.
Try:

Code:
[TABLE="width: 436"]
<colgroup><col width="436"></colgroup><tbody>[TR]
   [TD="width: 436"]=AND(OR(C13="CharterB",C13="CharterKP"),OR(F13<4,F13>22))[/TD]
 [/TR]
</tbody>[/TABLE]
 
Upvote 0

Forum statistics

Threads
1,223,903
Messages
6,175,287
Members
452,631
Latest member
a_potato

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top