DD/MM/YY

Zubair

Active Member
Joined
Jul 4, 2009
Messages
304
Office Version
  1. 2016
Platform
  1. Windows
I have a list of dates manually putted need formula to convert it to DD MM YY, please help, in some cases space after coma is available and some time not.

April 16,2021
April 1,2021

DDMMYY
16042021
01042021
 

Excel Facts

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.
Try

VBA Code:
Sub test()

Dim LR1 as long, cell As Range

With ThisWorkbook.Sheets(1)
LR1 = .Range("A" & Rows.Count).End(xlUp).Row
    For Each cell In .Range("D2:D" & LR1)
        With cell
            .Value = .Offset(, -3) & "/" & .Offset(, -2) & "/" & .Offset(, -1)
            .Value = .Value
            .NumberFormat = "dd/mm/yyyy"
        End With
    Next cell
End With

End Sub
 
Upvote 0
Solution
A variety of potential solutions; try your preference.
Format the dates to your preference

Date and Time 2021.xlsm
ABCD
1April 16,202116-Apr-2116-Apr-2116-Apr-21
2April 1,20211-Apr-211-Apr-211-Apr-21
3January 31,201031-Jan-1031-Jan-1031-Jan-10
4January 1 ,20101-Jan-10
5January 1, 2011
6
7DayMonth Year
816-Apr-211642021
91-Apr-21142021
1031-Jan-103112010
111-Jan-10112010
121-Jan-11112011
13
8c
Cell Formulas
RangeFormula
C1:C3C1=IF(ISNUMBER(A1),A1,--MID(SUBSTITUTE(A1,",",", "),1,99))
D1:D3D1=DATE(RIGHT(A1,4),MONTH(1&LEFT(A1,3)),MID(A1,FIND(",",A1)-2,2))
B1:B4B1=IF(ISNUMBER(A1),A1,DATEVALUE(SUBSTITUTE(A1,",",", ")))
A8:A11A8=B1
B8:B12B8=DAY(A8)
C8:C12C8=MONTH(A8)
D8:D12D8=YEAR(A8)
A12A12=A5
 
Upvote 0

Forum statistics

Threads
1,215,480
Messages
6,125,053
Members
449,206
Latest member
Healthydogs

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