ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Date format (https://www.excelbanter.com/excel-discussion-misc-queries/44444-date-format.html)

AG

Date format
 
I want to have a column to be my date field. I want to be able to enter for
instance 09072005 or 90705 I would like for Excel to be able to convert it to
read 09/07/2005. If I format my cell to Date it reads as ########, If I
leave my cell as General it excepts the number but does not have the slashes.
Thanks for your help.
ANN

--
AG

Ron Rosenfeld

On Thu, 8 Sep 2005 10:35:03 -0700, "AG" wrote:

I want to have a column to be my date field. I want to be able to enter for
instance 09072005 or 90705 I would like for Excel to be able to convert it to
read 09/07/2005. If I format my cell to Date it reads as ########, If I
leave my cell as General it excepts the number but does not have the slashes.
Thanks for your help.
ANN



You will need to either use VBA to convert it, or enter the data in one column
and convert it with a formula in another.

The formula would be (with your entry in A1):

=--TEXT(A1,"00\/00\/0000") or
=--TEXT(A1,"00\/00\/00")

(depending on which format you decide to use for entry)

and format the cell as a Date


--ron

Dave Peterson

You could do all your data entry and then
data|text to columns
fixed width
(erase any lines that excel guesses)

choose mdy (or dmy???) as the date format.

Chip Pearson has some VBA code that could do what you want at:
http://www.cpearson.com/excel/DateTimeEntry.htm



AG wrote:

I want to have a column to be my date field. I want to be able to enter for
instance 09072005 or 90705 I would like for Excel to be able to convert it to
read 09/07/2005. If I format my cell to Date it reads as ########, If I
leave my cell as General it excepts the number but does not have the slashes.
Thanks for your help.
ANN

--
AG


--

Dave Peterson


All times are GMT +1. The time now is 02:52 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com