Working with dates in excel

Yugaa2010

New Member
Joined
Dec 6, 2019
Messages
16
Office Version
  1. 2013
Platform
  1. Windows
Hi,

cell A1 = 12, January, 2020, 15, February, 2020, 16, march, 2020............

The above shown text available in in single cell
i am expecting results like in different cells a2 a3 a4 ....
12/January/2020
15/February/2020
16/March/2020


Could you please suggest any idea how can i do this ?
Thanks in advance
 

Excel Facts

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying
Hi, you can try B1=Substitute (A1,",","/")
Or use CTRL+H to replace , with /.
 
Upvote 0
Format column A as dd/mmmm/yyyy then :
VBA Code:
Sub v()
Dim s, r%, i
s = Split(Trim([A1]), ", ")
r = 2
For i = 0 To UBound(s)
    Cells(r, "A") = s(i) & "/" & s(i + 1) & "/" & s(i + 2)
    r = r + 1
    i = i + 2
Next
End Sub
The data in A1 needs to be exactly in the format as posted with the separator ", "
 
Upvote 0
Format column A as dd/mmmm/yyyy then :
VBA Code:
Sub v()
Dim s, r%, i
s = Split(Trim([A1]), ", ")
r = 2
For i = 0 To UBound(s)
    Cells(r, "A") = s(i) & "/" & s(i + 1) & "/" & s(i + 2)
    r = r + 1
    i = i + 2
Next
End Sub
The data in A1 needs to be exactly in the format as posted with the separator ", "

Hi Thank you
its working very good.

If possible can you please modify for this text as well.

A1 =
june 8, 2020, july 8, 2020, august 9, 2020...

Thanks in advance :)
 
Upvote 0
Oh, seems I overlooked the dates are all in a single cell. Sorry for this, Yugaa2010, can't blame it on sleepy eyes (it was after noon).
The VBA code provided is better then any Power Query M-code I can come-up with.
 
Upvote 0
If possible can you please modify for this text as well.
A1 =
june 8, 2020, july 8, 2020, august 9, 2020...
VBA Code:
Sub v()
Dim s, r%, i
s = Split(Trim([A1]), ", ")
r = 2
For i = 0 To UBound(s)
    Cells(r, "A") = s(i) & ", " & s(i + 1)
    r = r + 1
    i = i + 1
Next
End Sub
Format column A as required.
 
Upvote 0

Forum statistics

Threads
1,214,952
Messages
6,122,454
Members
449,083
Latest member
Ava19

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