Condtional formatting for dates.

jayjay2022

New Member
Joined
May 28, 2022
Messages
9
Office Version
  1. 365
Platform
  1. Windows
  2. Mobile
Hi everyone,

I have added another word to my dropdown menu and condiational formatting so I can clear expired dates when they are complete.

Currenlty when I choose Completed from the drop down menu it removes the pink highlight from the date so I know I don't need to chase them up. I am wanting to add an extra word "Cancelled" so this can also remove the highlited format from the date column

Example below

1653772297728.png


My current code - this works.

1653772038327.png


I have tried to duplicate the formula but when I do it then highlights everything, making the formula void. I have tried adding to the same formula but I think my syntax is incorrect.

Can someone help please?
Thanks
 

Excel Facts

How to create a cell-sized chart?
Tiny charts, called Sparklines, were added to Excel 2010. Look for Sparklines on the Insert tab.
I tried adding this code " =OR(AND(H2<>"Completed","Cancelled",A2<TODAY()-1)) but still no change. Need help.
Thanks
 
Upvote 0
Can you clarify: Is your conditional formatting adding the pink to certain cells or is it removing pink that was previously applied manually?

Can you confirm that it is column A that you have shown us?

Could you show us the data again but include column H as well to help us understand? You can hide the intervening columns if data is sensitive.

Better still, can you give us the sample data (hiding intervening columns again) with XL2BB so that we can better see what you have and where and we can also copy that data for testing if required?
 
Upvote 0
Can you clarify: Is your conditional formatting adding the pink to certain cells or is it removing pink that was previously applied manually?

Can you confirm that it is column A that you have shown us?

Could you show us the data again but include column H as well to help us understand? You can hide the intervening columns if data is sensitive.

Better still, can you give us the sample data (hiding intervening columns again) with XL2BB so that we can better see what you have and where and we can also copy that data for testing if required?
Below is a screenshot of what happens when I apply completed (dropdown menu)

Column A is already highlighted when no data is present in the cell - just a reminder there formatting on column A

1653797346478.png


When data is present and has a current date, the pink highlight will go disappear. After two days Column A will re-highlight pink again unless "Completed" is used in column H

1653796953764.png


I am now wanting column A to the same when I use "Cancelled". I hope this make sense.


Date formatting.xlsx
AB
129/03/2022Completed
230/03/2022WIP
330/03/2022Parts
41/04/20221st approval
511/04/2022Cancelled
611/04/2022Completed
Sheet1
Cells with Conditional Formatting
CellConditionCell FormatStop If True
B:BCell Valuecontains "Cancelled"textNO
B1:B6Cell Valuecontains "Parts"textNO
A1:A6Expression=AND(B1<>"Completed",A1<TODAY()-1)textNO
B1:B6Cell Valuecontains "3rd approval "textNO
B1:B6Cell Valuecontains "2nd approval "textNO
B1:B6Cell Valuecontains "1st approval "textNO
B1:B6Cell Valuecontains "WIP"textNO
B1:B6Cell Valuecontains "Completed"textNO
Cells with Data Validation
CellAllowCriteria
B1:B6ListCancelled, Parts , 1st approval , 2nd approval , 3rd approval , WIP , Completed
 
Upvote 0
Thanks for the XL2BB sample.

Is this what you want for column A then?

22 05 29.xlsm
AB
129/03/2022Completed
230/03/2022WIP
330/03/2022Parts
41/04/20221st approval
511/04/2022Cancelled
611/04/2022Completed
7
8
9
10
CF Dates
Cells with Conditional Formatting
CellConditionCell FormatStop If True
A1:A10Expression=AND(B1<>"Completed",B1<>"Cancelled",A1<TODAY()-1)textNO
 
Upvote 0
Solution
Thanks for the XL2BB sample.

Is this what you want for column A then?

22 05 29.xlsm
AB
129/03/2022Completed
230/03/2022WIP
330/03/2022Parts
41/04/20221st approval
511/04/2022Cancelled
611/04/2022Completed
7
8
9
10
CF Dates
Cells with Conditional Formatting
CellConditionCell FormatStop If True
A1:A10Expression=AND(B1<>"Completed",B1<>"Cancelled",A1<TODAY()-1)textNO
Thank you so much. This worked a treat.
 
Upvote 0
You're welcome. Thanks for the follow-up. :)
 
Upvote 0

Forum statistics

Threads
1,215,898
Messages
6,127,633
Members
449,392
Latest member
Kersh82

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