Separating Date from Text in One Cell

Tracy2573

New Member
Joined
Feb 25, 2016
Messages
18
Office Version
  1. 365
Platform
  1. Windows
Hello, I have text then a date in one cell and I would like to extract just the date portion into a separate cell. Is there a formula to do this instead of doing the Text to Columns every time I update my data?

The cell I am trying to separate looks like this:

Ticket # 14979 02/17/2022

I would like to have 02/17/2022 put into another cell on its own.

Sometimes the text will look like this if space is missed:

Ticket# 14979 02/17/2022
 

Excel Facts

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"
What version of Excel are you using?

I suggest that you update your Account details (or click your user name at the top right of the forum) so helpers always know what Excel version(s) & platform(s) you are using as the best solution often varies by version. (Don’t forget to scroll down & ‘Save’)

Also is the date always the last part of the string?
 
Upvote 0
Book1 (version 2).xlsb
AB
1Ticket # 14979 02/17/20222/17/2022
Sheet5
Cell Formulas
RangeFormula
B1B1=EXD(A1)


VBA Code:
Function EXD(d As String) As Date
With CreateObject("VBScript.RegExp")
    .Pattern = "(?:\d{1,2}\/)+\d{2,4}"
    EXD = .Execute(d)(0)
End With
End Function
 
Upvote 0
What version of Excel are you using?

I suggest that you update your Account details (or click your user name at the top right of the forum) so helpers always know what Excel version(s) & platform(s) you are using as the best solution often varies by version. (Don’t forget to scroll down & ‘Save’)

Also is the date always the last part of the string?
I just did that thanks, and yes the date is always at the end
 
Upvote 0
Thanks for that. How about
Excel Formula:
=DATEVALUE(RIGHT(A2,10))
 
Upvote 0

Forum statistics

Threads
1,214,985
Messages
6,122,606
Members
449,089
Latest member
Motoracer88

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