Convert text date to date format

Excel Facts

How to create a cell-sized chart?
Tiny charts, called Sparklines, were added to Excel 2010. Look for Sparklines on the Insert tab.
You could try putting a 1 in any unused cell, cutting that to the clipboard, then selecting your dates and using Paste>Paste Special>Values>Multiply.
 
Upvote 0
Hi,

In your example file , enter in D2 =DATEVALUE(REPLACE(B2,1,FIND(",",B2),""))
then go to cells format and change to date

=DATEVALUE(REPLACE(B2,1,FIND(",",B2),"")) +1 ​for next day...
 
Upvote 0
Alternatively, you could use a macro like:
Code:
Sub Demo()
Dim i As Long
With Selection
  For i = 1 To .Cells.Count
    .Cells(i).Value = CDate(Split(.Cells(i).Text, ", ")(1))
  Next
End With
End Sub
 
Upvote 0
Solution
Hi,

In your example file , enter in D2 =DATEVALUE(REPLACE(B2,1,FIND(",",B2),""))
then go to cells format and change to date

=DATEVALUE(REPLACE(B2,1,FIND(",",B2),"")) +1 ​for next day...

Alternatively, you could use a macro like:
Code:
Sub Demo()
Dim i As Long
With Selection
  For i = 1 To .Cells.Count
    .Cells(i).Value = CDate(Split(.Cells(i).Text, ", ")(1))
  Next
End With
End Sub

Thank you both so much, both solutions work perfectly. Now i have 2 ways of solving this problem, appreciate the help! :)
 
Upvote 0

Forum statistics

Threads
1,216,115
Messages
6,128,923
Members
449,479
Latest member
nana abanyin

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