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

Does anyone have or know where I can get a macro that will allow me to enter
a date for example as 112808 then "enter" and have excel format it as
11/28/08? (using a MM/DD/YY format)
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,393
Default Excel Date Format Macro

You would need an On_Change worksheet macro but there are other options:
1) after entering a number of values in your 112808 format, select the range
and use Data | TextToColumn to convert to dates -- notes there is an option
for this in the third step when you use Delimited (rather than Fixed Length)
2) enter your numbers in one column (say A) and use a helper column to
convert to dates with =DATE(RIGHT(A1,2)+100,LEFT(A1,2),MID(A1,3,2))
best wishes
--
Bernard V Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme
remove caps from email

"nicole3208" wrote in message
...
Does anyone have or know where I can get a macro that will allow me to
enter
a date for example as 112808 then "enter" and have excel format it as
11/28/08? (using a MM/DD/YY format)



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,124
Default Excel Date Format Macro

Here is one I am using for time entered 0820 or 1528, etc
Right click sheet tabview codecopy/pastemodify to suit

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Count 1 Then Exit Sub
If Intersect(Target, Columns("c")) Is Nothing Then Exit Sub
Application.EnableEvents = False
Target.Value = Format(Target, "00:00")
Target.NumberFormat = "hh:mm"
Application.EnableEvents = True
End Sub

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"nicole3208" wrote in message
...
Does anyone have or know where I can get a macro that will allow me to
enter
a date for example as 112808 then "enter" and have excel format it as
11/28/08? (using a MM/DD/YY format)


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default Excel Date Format Macro

Hi nicole3208

See also
http://www.xldynamic.com/source/xld.QDEDownload.html

--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"nicole3208" wrote in message ...
Does anyone have or know where I can get a macro that will allow me to enter
a date for example as 112808 then "enter" and have excel format it as
11/28/08? (using a MM/DD/YY format)

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
Fixing the date format in a macro or VBA Geoff B Excel Worksheet Functions 1 September 7th 09 11:00 AM
Format date macro Dagonini Excel Programming 3 January 9th 07 02:08 PM
Date Format Macro Problem joecrabtree Excel Programming 4 December 20th 06 02:58 PM
Excel 2000 date format cannot be set to Australian date format Brian Jones Excel Discussion (Misc queries) 1 March 30th 05 06:03 AM
Macro to format date sw Excel Programming 4 October 15th 03 01:23 PM


All times are GMT +1. The time now is 10:25 AM.

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"