ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   rationalizing date format in column (https://www.excelbanter.com/excel-programming/330170-rationalizing-date-format-column.html)

Italian Pete

rationalizing date format in column
 
I have an excel spreadsheet with a date column with the cells in the column
formatted as Date "dd/mm/yy". However, some of the cells contain the date in
other forms such as: dd.mm.yy or ddth month yyyy (the column format doesn't
seem to have had any effect on these). Is the way to resolve this problem to
write a macro to convert the unconverted and if so, what would the code be?

Many thanks

Pete

Niek Otten

rationalizing date format in column
 
Hi Pete,

These "dates" are text for Excel.
If the format is consistent, you can derive a date from it with a formula
like

=DATE(RIGHT(A1,2),MID(A1,4,2),LEFT(A1,2))

Adjust the formula for the other format or let the formula sort the format
out itself.

--

Kind Regards,

Niek Otten

Microsoft MVP - Excel



"Italian Pete" wrote in message
...
I have an excel spreadsheet with a date column with the cells in the column
formatted as Date "dd/mm/yy". However, some of the cells contain the date
in
other forms such as: dd.mm.yy or ddth month yyyy (the column format
doesn't
seem to have had any effect on these). Is the way to resolve this problem
to
write a macro to convert the unconverted and if so, what would the code
be?

Many thanks

Pete





All times are GMT +1. The time now is 12:40 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com