Need help with formula to extract date from text string

sparkytech

Board Regular
Joined
Mar 6, 2018
Messages
98
Office Version
  1. 365
  2. 2019
I need some help creating a conditional format formula without using a helper cell. I have cell Q19 formatted as text, and it contains a text string with a date, and sometimes additional text. Examples of cell Q19 content are: "Rev #1 1/1/2025", "Rev #1 01/01/2025", or just a date, such as "1/1/2025" or "01/01/2025". Can someone help me create a conditional format formula to look for the date in this cell and then check if the date is past due? This seems simple enough, but no matter what I try, I can't seem to make it work. Thanks in advance!
 

Excel Facts

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.
If you are using Excel 365 (which your profile suggests might be the case), you could use this Conditional Formatting formula:
Excel Formula:
=IF(ISNUMBER(Q19),Q19,DATEVALUE(CHOOSECOLS(TEXTSPLIT(Q19," "),-1)))<TODAY()

And here is it where I show it working on the myriad of different options you mentioned (and I used a date in the past and a date in the future).

1735840787341.png
 
Upvote 0
Another option:
Excel Formula:
=(--TEXTAFTER(" "&A2," ",-1))<TODAY()
 
Upvote 0
You are welcome.
Glad we were able to help!

Obviously, Cubist's formula is a little more succinct than mine!
 
Upvote 0

Forum statistics

Threads
1,225,308
Messages
6,184,195
Members
453,220
Latest member
flyingdutchman_

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