A formula to turn a cell red when a date is met

les361800

New Member
Joined
Jul 11, 2023
Messages
28
Office Version
  1. 365
Platform
  1. Windows
Hello, a simple one I hope (but not for me!)

Would anyone mind helping me out with a formula that turns the relevant name cell red when the due date is the following day?
I'm not sure if possible... but is there any way to account for the weekends so if its due on Monday it would turn red on a Friday?

Thank you for any help :)
 

Attachments

  • Screenshot 2024-03-14 074204.png
    Screenshot 2024-03-14 074204.png
    16.4 KB · Views: 14

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.
If those dates in column C are text (as they appear to be since they are left-aligned) then try this.

24 03 14.xlsm
BC
1NameDue
2asap
320.03.24
420.03.24
515.03.24
6
715.03.24
8not urgent
915.03.24
Red (2)
Cells with Conditional Formatting
CellConditionCell FormatStop If True
B2:B9Expression=--SUBSTITUTE(C2,".","/")=WORKDAY(TODAY(),1)textNO


If the dates in column C are actual dates but just formatted with dots, then try this

24 03 14.xlsm
BC
1NameDue
2asap
320.03.24
420.03.24
515.03.24
6
715.03.24
8not urgent
915.03.24
Red
Cells with Conditional Formatting
CellConditionCell FormatStop If True
B2:B9Expression=C2=WORKDAY(TODAY(),1)textNO
 
Upvote 0
Solution
If those dates in column C are text (as they appear to be since they are left-aligned) then try this.

24 03 14.xlsm
BC
1NameDue
2asap
320.03.24
420.03.24
515.03.24
6
715.03.24
8not urgent
915.03.24
Red (2)
Cells with Conditional Formatting
CellConditionCell FormatStop If True
B2:B9Expression=--SUBSTITUTE(C2,".","/")=WORKDAY(TODAY(),1)textNO


If the dates in column C are actual dates but just formatted with dots, then try this

24 03 14.xlsm
BC
1NameDue
2asap
320.03.24
420.03.24
515.03.24
6
715.03.24
8not urgent
915.03.24
Red
Cells with Conditional Formatting
CellConditionCell FormatStop If True
B2:B9Expression=C2=WORKDAY(TODAY(),1)textNO

Thank you for your reply. I have forgotten how to apply this. Am I in the right function?
I have indeed formatted the column to be dates, but I punched them in with dots.
 

Attachments

  • Screenshot 2024-03-14 091909.png
    Screenshot 2024-03-14 091909.png
    40.8 KB · Views: 6
Upvote 0
have forgotten how you apply this.
This is Conditional Formatting
Select from B2 down as far as you might want this to happen, then
Home ribbon tab -> Conditional Formatting -> New rule ... -> Use a formula to determine which cells to format -> Format values where this formula is true:- enter the relevant formula that I gave you -> Format... -> Fill tab -> Choose red -> OK -> OK
 
Upvote 0
I have indeed formatted the column to be dates, but I punched them in with dots.
They still may not be actual dates. Test with a formula like this. If they are actual dates it will return FALSE. Since my example returns TRUE, my date is C2 is not a true date but text.

24 03 14.xlsm
CD
320.03.24TRUE
Red (2)
Cell Formulas
RangeFormula
D3D3=ISTEXT(C3)
 
Upvote 0
They still may not be actual dates. Test with a formula like this. If they are actual dates it will return FALSE. Since my example returns TRUE, my date is C2 is not a true date but text.

24 03 14.xlsm
CD
320.03.24TRUE
Red (2)
Cell Formulas
RangeFormula
D3D3=ISTEXT(C3)
Thanks, I've changed the dates to have a / between and run that formula - it says true.
The conditional formatting still isnt working though, there's a few names that should be turning red as due tomorrow but nothing is changing
 
Upvote 0
They still may not be actual dates. Test with a formula like this. If they are actual dates it will return FALSE. Since my example returns TRUE, my date is C2 is not a true date but text.

24 03 14.xlsm
CD
320.03.24TRUE
Red (2)
Cell Formulas
RangeFormula
D3D3=ISTEXT(C3)

Another screenshot if helpful...
 

Attachments

  • Screenshot 2024-03-14 093847.png
    Screenshot 2024-03-14 093847.png
    97.6 KB · Views: 5
Upvote 0
They still may not be actual dates. Test with a formula like this. If they are actual dates it will return FALSE. Since my example returns TRUE, my date is C2 is not a true date but text.

24 03 14.xlsm
CD
320.03.24TRUE
Red (2)
Cell Formulas
RangeFormula
D3D3=ISTEXT(C3)
Ah wait I was being thick. It's working now, I forgot to change the C to a D as I added a new column!

Thank you very much for your assistance!!
Have a great day Peter :)
 
Upvote 0
Another screenshot if helpful...
Yes, it shows that you have
  1. Not followed my first point "Select from B2 down as far as you might want this to happen". Your image shows the CF is only applied to B2
  2. Changed columns
  3. Used the formula I suggested for text dates after you have changed the dates to actual (numerical) dates. Use the formula (adjusted for correct column) =C2=WORKDAY(TODAY(),1)
 
Upvote 1

Forum statistics

Threads
1,223,907
Messages
6,175,301
Members
452,633
Latest member
DougMo

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