Conditional formatting based on dates

DarkoDeign2

Board Regular
Joined
Jun 20, 2023
Messages
76
Office Version
  1. 365
Platform
  1. Windows
Hi,

In column: W, Y, AA, AC & AE, I have dates. Some columns/cells are empty.
The range of these columns are from 2 to 1500, so e.g. W2:W1500, AA2:AA1500 and so on...
If there are dates in the colums, the first date is in col W. In the next col Z the date would be the value from W + 7days and so on.
W = (a random date)
Y = W+7days
AA = W+Y+7days
AC = W+Y+AA+7days
AE = W+Y+AA+AC+7days

I am looking for a solution for conditional formatting on every row.
To highlight the last date and fill the cell with lets say green color if the date in this cell is older than todays date.

Book1
WYAAACAE
12023-06-202023-06-272023-07-042023-07-112023-07-18
22023-07-022023-07-092023-07-16
32023-07-04
42023-07-072023-07-142023-07-212023-07-28
52023-07-072023-07-142023-07-212023-07-28
62023-07-072023-07-142023-07-212023-07-28
72023-07-112023-07-182023-07-252023-08-01
82023-07-142023-07-212023-07-282023-08-04
92023-07-172023-07-242023-07-31
102023-07-172023-07-242023-07-31
112023-07-18
122023-07-202023-07-27
132023-07-212023-07-28
142023-07-212023-07-28
Sheet1
 
Last edited:

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.
MrExcelPlayground19.xlsx
WXYZAAABACADAE
16/20/20236/27/20237/4/20237/11/20237/18/2023
27/2/20237/9/20237/16/2023
37/4/2023
47/7/20237/14/20237/21/20237/28/2023
57/7/20237/14/20237/21/20237/28/2023
67/7/20237/14/20237/21/20237/28/2023
77/11/20237/18/20237/25/20238/1/2023
87/14/20237/21/20237/28/20238/4/2023
97/17/20237/24/20237/31/2023
107/17/20237/24/20237/31/2023
117/18/2023
127/20/20237/27/2023
137/21/20237/28/2023
147/21/20237/28/2023
Sheet8
Cells with Conditional Formatting
CellConditionCell FormatStop If True
W1:AE14Expression=AND(W1=MAX($W1:$AE1),W1<TODAY())textNO
W1:AE14Expression=W1=MAX($W1:$AE1)textNO
 
Upvote 1
Solution
Hi,

Somehow I don't get this to work. Random cells are highlighted.
I selected W-AE columns at once and applied the conditional formatting. Should I have done it differently?
 
Upvote 0
I converted mine to work on the whole columns, and it works... Does the 'randomness' look like it's just offset by one row?
 
Upvote 0
Hi again,
Now it works, I realised that the formula start from W1, but my conditional formatting starts from W2.
So now it works perfectly.
But the latter parts of the colums that are completly empty turns yellow...
Thanks for the quick help.
 
Upvote 0
This should sort the empty parts:
MrExcelPlayground19.xlsx
WXYZAAABACADAE
16/20/20236/27/20237/4/20237/11/20237/18/2023
27/2/20237/9/20237/16/2023
37/4/2023
47/7/20237/14/20237/21/20237/28/2023
57/7/20237/14/20237/21/20237/28/2023
67/7/20237/14/20237/21/20237/28/2023
77/11/20237/18/20237/25/20238/1/2023
87/14/20237/21/20237/28/20238/4/2023
97/17/20237/24/20237/31/2023
107/17/20237/24/20237/31/2023
117/18/2023
127/20/20237/27/2023
137/21/20237/28/2023
147/21/20237/28/2023
15
16
17
18
19
Sheet8
Cells with Conditional Formatting
CellConditionCell FormatStop If True
W:AEExpression=AND(W1=MAX($W1:$AE1),W1<TODAY(),W1<>"")textNO
W:AEExpression=AND(W1<>"",W1=MAX($W1:$AE1))textNO
 
Upvote 0

Forum statistics

Threads
1,215,094
Messages
6,123,071
Members
449,092
Latest member
ipruravindra

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