Conditional Format - Highlight Cell if Not Sunday

SaraWitch

Active Member
Joined
Sep 29, 2015
Messages
321
Office Version
  1. 365
Platform
  1. Windows
Hello peeps.

I have Column R formatted to ddd, dd/dd/dddd. If the date entered is not a Sunday, I want to highlight it red. I have tried CFs:
=ISERROR(FIND("Sun*",$R3)) (Fill red)

And:
Condition 1: =ISBLANK($R3)=TRUE (No format Set)
Condition 2: = ISNUMBER(SEARCH("Sun*",$R3))=FALSE (Fill red)

Both are highlighting all the cells (which are either blank or have a Sunday date (e.g., Sun, 27/06/2021)).

Any help would be appreciated...

Ta muchly!
 

Excel Facts

Excel Joke
Why can't spreadsheets drive cars? They crash too often!
That's grand; thank you, @BenMcBen! And how do I not highlight if blank cell*?

*Don't worry, I figured it out by adding another CF:
ISBLANK($R3) ...then ticking 'Stop If True'.

Thank you for your speedy fix, @BenMcBen! :)
 
Last edited:
Upvote 0
Use the "AND()" function to add an extra check - eg (several ways you could skin this cat):

Excel Formula:
=and(text(yourcell,"DDD")<>"Sun",NOT(ISBLANK(yourcell)))

There's a lot of variations to the exact formula you could use above (e.g. using the WEEKDAY() function), you could also use separate CF rules with stops etc...
 
Upvote 0
No need to add another rule, you can use
Excel Formula:
=and(text($R3,"ddd")<>"Sun",$R3<>"")
 
Upvote 0
Perfect; thanks, both.

I've actually ended up using data validation to not allow dates other than a Sunday!

This is all useful to my Excel knowledge though and I can use this elsewhere, so thank you!

HNY! ?
 
Upvote 0
Glad we could help & thanks for the feedback.
 
Upvote 0
Sorry, guys; I have another element I need to add!

If I want this to apply only if "EBC" or "LDC" in Column E, how would this look?
 
Upvote 0
How about
Excel Formula:
=AND(TEXT($R3,"ddd")<>"Sun",$R3<>"",OR($E3="EBC",$E3="LDC"))
 
Upvote 0

Forum statistics

Threads
1,214,534
Messages
6,120,084
Members
448,943
Latest member
sharmarick

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