Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 12
Default Need macro to change date from yyyymmdd format to mm/dd/yyyy forma

I received some data with the dates in a yyyymmdd format. Although I can go
in and change this by splitting the data up with the text to column option,
then concatenate the rows with a "/" in between them, I was wondering if
anyone has put together a macro to do this a bit faster than it takes to go
through all of these other steps.

Thanks,
--
Acknowledge and Move on.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Need macro to change date from yyyymmdd format to mm/dd/yyyy forma

for each cell in selection
with cell
.value = datevalue(mid(.value,5,2) & "/" & Mid(.value,7,2) & "/" _
& mid(.value,1,4))
End with
Next

--
Regards,
Tom Ogilvy


"Iris" wrote in message
...
I received some data with the dates in a yyyymmdd format. Although I can

go
in and change this by splitting the data up with the text to column

option,
then concatenate the rows with a "/" in between them, I was wondering if
anyone has put together a macro to do this a bit faster than it takes to

go
through all of these other steps.

Thanks,
--
Acknowledge and Move on.



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default Need macro to change date from yyyymmdd format to mm/dd/yyyy forma

Hi

No need for code

You can use Data Text to columns
next
next
choose YMD
to A1

Then change the format in column A what you want

--
Regards Ron de Bruin
http://www.rondebruin.nl


"Iris" wrote in message ...
I received some data with the dates in a yyyymmdd format. Although I can go
in and change this by splitting the data up with the text to column option,
then concatenate the rows with a "/" in between them, I was wondering if
anyone has put together a macro to do this a bit faster than it takes to go
through all of these other steps.

Thanks,
--
Acknowledge and Move on.



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 12
Default Need macro to change date from yyyymmdd format to mm/dd/yyyy forma

Never mind, I found out about the other text to column method where you
select the delimited option, then select the date format of ymd. It
automatically sets it to mm/dd/yyyy. :)
--
Acknowledge and Move on.


"Iris" wrote:

I received some data with the dates in a yyyymmdd format. Although I can go
in and change this by splitting the data up with the text to column option,
then concatenate the rows with a "/" in between them, I was wondering if
anyone has put together a macro to do this a bit faster than it takes to go
through all of these other steps.

Thanks,
--
Acknowledge and Move on.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
how do I convert date format yyyymmdd to mm/dd/yyyy Datahead Excel Worksheet Functions 3 May 11th 23 11:45 AM
how do I change the date format from yyyymmdd to mm/dd/yyyy Charlene Excel Worksheet Functions 5 May 6th 23 07:46 PM
change date format from dd/mm/yyyy to mm/yyyy flow23 Excel Discussion (Misc queries) 3 April 4th 23 11:26 AM
how do I change date from mm/dd/yyyy to dd:mm:yyyy format in Excel Jack Wilson New Users to Excel 4 July 18th 06 01:57 PM
How to convert the dates from the YY:DD forma to MM/dd/YYYY format Sam Excel Worksheet Functions 4 July 15th 05 12:01 PM


All times are GMT +1. The time now is 07:03 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"