+ Reply to Thread
Results 1 to 4 of 4

another date format question

  1. #1
    Registered User
    Join Date
    02-21-2013
    Location
    Nashville, TN
    MS-Off Ver
    Excel 2010
    Posts
    24

    another date format question

    I cannot find the answer within the form, but I may be overlooking it. There are many similar posts, most using =LEFT() =RIGHT(), etc.

    I use the US version of Excel and have my date/time format in Windows set to US. I have a user (also US format) who inputs dates in the M.D.YY format. Unfortunately Excel does not recognize these as dates so using them for calculations is not possible. I would like to set up a macro to reformat the M.D.YY into a standard MM/DD/YYYY format or similar.

    An example would be column A with:
    4.24.13
    4.24.13
    4.24.13
    4.24.13

    I found the below macro which gets the month and date backwards, so it is not helpful but gets close...

    Please Login or Register  to view this content.
    Any help would be appreciated. Thanks!

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,923

    Re: another date format question

    The macro is using Text to Columns which is often the solution. You can record your own version.

    Start recording a macro. Select the column of dates. Choose Data | Text to Columns. Choose Delimited. Clear all the selections and click OK. On the next page click on MDY format and then OK out. Stop the macro.

    You should now have your own version of the macro.


    Regards, TMS
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Registered User
    Join Date
    02-21-2013
    Location
    Nashville, TN
    MS-Off Ver
    Excel 2010
    Posts
    24

    Re: another date format question

    Thank you! I had never encountered that function in Excel. I had to adjust the macro such that the output would be in the appropriate place when I needed to use it in a different location. Here's what I did...

    Please Login or Register  to view this content.

  4. #4
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,923

    Re: another date format question

    You're welcome.

    By recording the macro yourself and amending the parameters to meet your needs you will have learned a lot.

    Regards, TMS

+ 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