Formula referencing cell(s) with dates as well as text inside them

MustaphaOj

New Member
Joined
Jul 8, 2020
Messages
20
Office Version
  1. 2016
Platform
  1. Windows
Hi All,

I have a particularly tricky task as I have a big data set that I am sitting through looking for some dates. Sounds simple enough until
You see some are formatted like this
“14-09-20 A” while the rest are formatted like “14/07/2020”
My question is if I wanted to make a formula that searches the whole data set looking for dates after a certain date (let’s say 23/07/2029) WITH the “A” included how would I go about it?


Name Date
Mark 14-09-20 A
John 15/07/2020
Peter 17-06-18 A
 

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.
is the Date prefixed by only " A" or there are some other character also in dates.
 
Upvote 0
Easiest way is to use Text to Columns, Highlight Column containing Dates, select Data>Text To Columns>Next>Chk "Space" as delimiter>Hit Finish

This will separate the data after the space into a separate column, leaving your dates as usable dates.
 
Upvote 0
Easiest way is to use Text to Columns, Highlight Column containing Dates, select Data>Text To Columns>Next>Chk "Space" as delimiter>Hit Finish

This will separate the data after the space into a separate column, leaving your dates as usable dates.
Hi Gaz,

Thank you for this. It’s a useful tool however I do need the dates with “A” in them as they are important to the task.
 
Upvote 0
OK. Then give more details as to what you want to do, is it simply to return a Yes/No if it finds the date? Or return other data or...........?

=left(B2,8)+0 can extract the date value, if that help
 
Upvote 0
Yes that’s exactly it. If it finds a date with an “A” in it after for example 23/07/20 then return a “Yes” if it doesn’t then “No”
 
Upvote 0
Try

=IF((LEFT(SUBSTITUTE(B2," ",REPT(" ",99)),10)+0)>=$C$1,"Yes","No")
$C$1 = date 23/07/2029

1595517183476.png
 
Upvote 0
Just in case you need to replace it use Ctrl+F and Replace " A" with "" so you will be left with only dates and Keep the Text with Right function =Right(Cell reference,2) it will keep the Text Also

Use Helper column do it .

I hope it might help you
 
Upvote 0

Forum statistics

Threads
1,214,415
Messages
6,119,377
Members
448,888
Latest member
Arle8907

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