+ Reply to Thread
Results 1 to 5 of 5

Automatically Changing Numbers to Date

  1. #1
    Registered User
    Join Date
    12-07-2007
    Posts
    2

    Automatically Changing Numbers to Date

    Hello,

    My question has to do with the way Excel formats numbers and dates in Excel. I would like to be able to type "052407" in a cell and have it automatically change to "05/24/07." A makeshift way of doing this is to Right-click, format cell, click Custom, and type "##-##-##" in the Type field (it won't allow slashes for some reason). However, Excel doesn't read this data as a date, it still thinks of it as a number. I would like the data I enter into a cell to be read as a date.

    Is my question clear?

    Thank you!

  2. #2
    Forum Expert Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2013, 2016, O365
    Posts
    6,996

    Automatically Changing Numbers to Date

    Perhaps this method will work for you...


    Enter the "dates" as you described
    When done....
    Select the column of dates

    From the Excel Main Menu
    <data><text-to-column>
    ....Click [Next]
    ....Click [Next]
    ....Check: Date.....MDY
    ....Click [Finish]

    The inputs will become actual dates.

    Is that something you can use?
    Ron
    Former Microsoft MVP - Excel (2006 - 2015)
    Click here to see the Forum Rules

  3. #3
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258
    Hello Intoxicated-T-F,

    Have a look at Chip Pearson's page on this...

    Dates - Quick Entry

    Sincerely,
    Leith Ross

  4. #4
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    To add to Ron suggestions.

    Right click sheet tab > Select view code > paste in the below code.

    The code assumes Column A is in text format and when you type 052407 it converts it too 24/05/2007

    Change Range to your range.
    Please Login or Register  to view this content.
    VBA Noob
    _________________________________________


    Credo Elvem ipsum etian vivere
    _________________________________________
    A message for cross posters

    Please remember to wrap code.

    Forum Rules

    Please add to your signature if you found this link helpful. Excel links !!!

  5. #5
    Registered User
    Join Date
    12-07-2007
    Posts
    2
    Thanks all! The link provided helped, and was exactly what I was looking for.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1