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

I have a date column with the format dd/mm/yy.
Is there away to just enter the numbers with the / being entered
automatically.
Thanks


---
Message posted from http://www.ExcelForum.com/

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,236
Default Easier date entry

Beesht,

If Column 1 contains your dates, then try the following:

It forces you to use the ddmmyy convention for data entry.

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Column = 1 Then
Application.EnableEvents = False
Target.Value = CDate(Format(CLng(Target.Value), "00""/""00""/""00"))
Application.EnableEvents = True
End If
End Sub

You could make it smarter by validating dates within a range (1986 to 2009)
and anything else is ddmmyy format - though I wouldn't recommend it.

Rob


"Beesht " wrote in message
...
I have a date column with the format dd/mm/yy.
Is there away to just enter the numbers with the / being entered
automatically.
Thanks


---
Message posted from http://www.ExcelForum.com/



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,824
Default Easier date entry

Chip Pearson has some date (and time) entry code at:
http://www.cpearson.com/excel/DateTimeEntry.htm

In fact, you may want to read about how excel treats dates and times:
http://www.cpearson.com/excel/datetime.htm



"Beesht <" wrote:

I have a date column with the format dd/mm/yy.
Is there away to just enter the numbers with the / being entered
automatically.
Thanks

---
Message posted from http://www.ExcelForum.com/


--

Dave Peterson

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
Autofill date on date entry in a separate column lemonshark Excel Worksheet Functions 2 February 18th 10 05:11 PM
Excel 2002 date entry: Cannot get away from d-m-yy entry format Steve Eklund Excel Discussion (Misc queries) 3 May 11th 09 04:57 PM
date entry medavino Excel Worksheet Functions 1 January 14th 08 06:08 PM
Restricting date entry relative to current date bwalshjr Excel Worksheet Functions 1 April 10th 07 12:49 PM
Date entry excel-duh?[_2_] Excel Discussion (Misc queries) 3 April 7th 07 11:08 PM


All times are GMT +1. The time now is 03:40 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"