Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Macro to convert date cells


I need to take a range of cells and convert the values of them into a
different date format. Currently the cells are in the form mm/dd/yyyy
h:mm:ss AM/PM. I need the cell to contain the value of mm/dd/yy
h24:mm. I can't just do a cell format because that doesn't change the
actual values in the cell. I think maybe I need to copy the values to
notepad (or likewise), reformat the cells to text, and then paste the
data back into excel. Anyone have any idea how to do this? Or if you
know a better way, I am all ears!!

Any input would be greatly appreciated, this is driving me crazy!

Brian


------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~View and post usenet messages directly from http://www.ExcelForum.com/

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Macro to convert date cells

Select the column. format with the format that you want. Now do Data=Text
to columns, select delimited and use TAB as the delimiter in the second
dialog and then click finished.

This should cause your values to be interpreted as dates. Suspect they are
being treated as Text right now.

--
Regards,
Tom Ogilvy


"bslater" wrote in message
...

I need to take a range of cells and convert the values of them into a
different date format. Currently the cells are in the form mm/dd/yyyy
h:mm:ss AM/PM. I need the cell to contain the value of mm/dd/yy
h24:mm. I can't just do a cell format because that doesn't change the
actual values in the cell. I think maybe I need to copy the values to
notepad (or likewise), reformat the cells to text, and then paste the
data back into excel. Anyone have any idea how to do this? Or if you
know a better way, I am all ears!!

Any input would be greatly appreciated, this is driving me crazy!

Brian


------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~View and post usenet messages directly from http://www.ExcelForum.com/



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
Is there a macro to convert times between 2 places dep. on date? Greg Excel Worksheet Functions 1 November 15th 05 09:33 PM
Macro to convert text to date Nortos Excel Worksheet Functions 2 May 11th 05 10:42 AM
Convert data type of cells to Text,Number,Date and Time Kevin Excel Worksheet Functions 1 December 31st 04 12:57 PM
Convert data of cells to any type: Number, Date&Time, Text Kevin Excel Discussion (Misc queries) 0 December 30th 04 06:55 AM
Macro to convert date cells bslater[_5_] Excel Programming 0 October 30th 03 06:43 PM


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

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

About Us

"It's about Microsoft Excel"