ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Excel Macro text swap (https://www.excelbanter.com/excel-programming/293473-excel-macro-text-swap.html)

Rick[_24_]

Excel Macro text swap
 
I need to change the date format in a column from 2004/2/30 to
2/30/2004. There are 1,500 dates to change, in the column, and some
are already in the correct format. Using the Date format for the
column properties does not correct this problem. I tried to make a
macro, which works, but it includes the original text, so can only be
used once. Any suggestions on this are appreciated.

Tom Ogilvy

Excel Macro text swap
 
columns(5).NumberFormat = "m/d/yyyy"

--
Regards,
Tom Ogilvy

"Rick" wrote in message
om...
I need to change the date format in a column from 2004/2/30 to
2/30/2004. There are 1,500 dates to change, in the column, and some
are already in the correct format. Using the Date format for the
column properties does not correct this problem. I tried to make a
macro, which works, but it includes the original text, so can only be
used once. Any suggestions on this are appreciated.





All times are GMT +1. The time now is 11:31 PM.

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