Date format

  • Thread starter Thread starter hme
  • Start date Start date
H

hme

Hi

I have to change data as yyyymmdd to date format as dd/mm/yyyy.would
you somebody help me?

thk

hme
 
Hi Excelpower

Thanks for prompt reply.
The data is in general format and it is requested to change to date
format.
for example:"ABCDEFGH" should change to "GH/EF/ABCD" in date format.

thk,

hme
 
Sub RearrangeDates()
Dim ary
Dim i As Long, j As Long
Dim iLastRow As Long

iLastRow = Cells(Rows.Count, "A").End(xlUp).Row
For i = 1 To iLastRow
With Cells(i, "A")
.Formula = DateSerial(Left(.Value, 4), Mid(.Value, 5, 2),
Right(.Value, 2))
End With
Next i
End Sub



--

HTH

Bob Phillips

(remove nothere from the email address if mailing direct)
 
Hi
Mark the range of cells with the data to be converted.
Data>Text to Columns>Next>Next>Date>D/M/Y>Finish
Format the date column as required.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Auto Color 4
date based question 5
Excel date format YYYYMMDD 1
Date distinguish 4
International Date formatting 4
Excel macro 1
check date format in regional setting 2
Text to date format? 0

Back
Top