Help with Date and Conditional formatting

maximillianrg

Board Regular
Joined
Aug 7, 2014
Messages
74
Office Version
  1. 2016
Platform
  1. Windows
Hello Excel Masters

in cell G25 I have the date 22-JAN-2024 which was populated using the below formula

=IF(COUNTIF(Helper!A:A,LEFT(TEXTAFTER(L25,"ETA: "),8))=1,LEFT(TEXTAFTER(L25,"ETA: "),8),IF(COUNTIF(Helper!B:B,LEFT(TEXTAFTER(L25,"ETA: "),11))=1,LEFT(TEXTAFTER(L25,"ETA: "),11),"Date Format Error"))

The below formula returns False if the date in cell G25 is in the future and False if it is in the past

=IF(DATEVALUE(TEXT(TODAY(),"dd-MMM-yyyy"))>DATEVALUE(G25),"T","F")

I want to set up conditional formatting to highlight all cells in column G that are in the past so I need help tweeking the above formula.

Note: Due to the way I am extracting the date in the first formula using > today() does not work
 

Excel Facts

Convert text numbers to real numbers
Select a column containing text numbers. Press Alt+D E F to quickly convert text to numbers. Faster than "Convert to Number"
in cell G25 I have the date 22-JAN-2024
To be very clear, in G25 you have the text string "22-JAN-2024". It is not a date, it just looks like a date.

Your conditional formatting formula needs be an expression that evaluates to TRUE or FALSE, not "T" or "F". Also your date processing is much more complicated than it needs to be. Simplify to:
Excel Formula:
=TODAY()>DATEVALUE(G25)

Cell Formulas
RangeFormula
G1:G12G1=UPPER(TEXT(F1,"dd-MMM-yyyy"))
Cells with Conditional Formatting
CellConditionCell FormatStop If True
G1:G12Expression=TODAY()>DATEVALUE(G1)textNO
 
Upvote 0
Afterthought: I don't know what else you are doing with the data in column G but you might be better off enclosing the whole formula in DATEVAULE() so that it is date data instead of text.
 
Upvote 0

Forum statistics

Threads
1,215,071
Messages
6,122,963
Members
449,094
Latest member
Anshu121

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