Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
JD
 
Posts: n/a
Default Formatting the Date in Excel

Is there any way in Excel that I can format the Date so I don't have to type
any slashes between the month and day? In other words, I would like to be
able to type in 0714 press "enter" and have excel recognize that this is
07/14/2005 without typing in 07/14.

Any suggestions would be appreciated.

Thanks,

  #2   Report Post  
Dave O
 
Posts: n/a
Default

Short of writing code, you could enter your numerics only date in cell
A1, for instance: 07142005. Then in B1 write a formula:
=mid(A1,1,2)&"/"&mid(A1,3,2)&"/"&left(A1,4)

Then you could copy column B and paste as values into their required
spot.

  #3   Report Post  
Matt Lunn
 
Posts: n/a
Default

Hi,

Excel will treat those values as numerics. The following formula could be used

=DATE(YEAR(NOW()),IF(LEN(A1)=3,LEFT(A1,1),IF(LEN(A 1)=4,LEFT(A1,2),NA())),RIGHT(A1,2))

You would have to ensure that the day portion was always 2 digits with this

eg enter 0701 and not 071 for 1st July. The formula assumes you mean the
current year (as defined on your system). Also, it doesn't check if the month
is 12 or below or for the max number of days for the month.


HTH
Matt


"JD" wrote:

Is there any way in Excel that I can format the Date so I don't have to type
any slashes between the month and day? In other words, I would like to be
able to type in 0714 press "enter" and have excel recognize that this is
07/14/2005 without typing in 07/14.

Any suggestions would be appreciated.

Thanks,

  #4   Report Post  
Gord Dibben
 
Posts: n/a
Default

JD

Chip Pearson has code for this.

http://www.cpearson.com/excel/DateTimeEntry.htm


Gord Dibben Excel MVP

On Thu, 14 Jul 2005 13:04:02 -0700, "JD" wrote:

Is there any way in Excel that I can format the Date so I don't have to type
any slashes between the month and day? In other words, I would like to be
able to type in 0714 press "enter" and have excel recognize that this is
07/14/2005 without typing in 07/14.

Any suggestions would be appreciated.

Thanks,


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
Excel 2003 FAILS, but Excel 2000 SUCCEEDS ??? Richard Excel Discussion (Misc queries) 2 May 13th 23 11:46 AM
Conditional formatting of date cebubum Excel Discussion (Misc queries) 4 June 28th 05 03:27 AM
Excel enters date as a text format Kane Excel Discussion (Misc queries) 3 March 22nd 05 10:20 PM
Despite formatting a column in Excel 2002 worksheet as Short Date. Pete Whalley Excel Discussion (Misc queries) 2 February 7th 05 07:17 PM
How do I disable automatic date formatting in excel? tcuneio Excel Discussion (Misc queries) 1 January 21st 05 11:47 PM


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