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

Excel motto
Not everything I do at work revolves around Excel. Only the fun parts.
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,214,646
Messages
6,120,718
Members
448,986
Latest member
andreguerra

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