+ Reply to Thread
Results 1 to 6 of 6

Adjust multiple date formats

  1. #1
    Forum Contributor
    Join Date
    03-24-2009
    Location
    Vietnam
    MS-Off Ver
    Excel 2010
    Posts
    382

    Adjust multiple date formats

    I have a column with date which was generated by my companies management system. however, this column now has two different date formats.

    the majority is in mm.dd.yyyy format, some unfortunately are in dd-mm-yyyy format.

    I have tried to set the date format for the whole column but does not change anything. is there any way to look for macros in the dd-mm-yyyy format and adjust them to mm.dd.yyyy?

    Thanks,
    A2k

  2. #2
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Adjust multiple date formats

    is one or the other real dates?
    if say
    25/10/2009 is real (format cell general if it changes to a number its "real")
    and 10.25.2009 is text
    then select column
    data/text to columns
    click next
    click next again
    choose date and select the format of your text date in this case mdy
    click finish
    warning this may affect the real dates so its best to number your rows in a spare column 1 down to whatever .then sort all the worksheet by dates column so all real dates together and all text dates the same
    copy text dates to a spare column do the above procedure then copy back over original
    then resort data by your numbered column to get it all back in the right order/ delete numbered column
    Last edited by martindwilson; 08-09-2009 at 08:48 AM.
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  3. #3
    Forum Contributor
    Join Date
    03-24-2009
    Location
    Vietnam
    MS-Off Ver
    Excel 2010
    Posts
    382

    Re: Adjust multiple date formats

    Ahm... this is complicated :D

    I have around 2000 rows and now when I did that, the other correct dates got affected when I was trying to copy them as part of my macro.

    Is there any way to have a macro do that for me? I dont really want to start looking around for incorrect dates and then start formatting...

    Thanks,
    A2k

  4. #4
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Adjust multiple date formats

    how long does a sort take?

  5. #5
    Forum Contributor
    Join Date
    03-24-2009
    Location
    Vietnam
    MS-Off Ver
    Excel 2010
    Posts
    382

    Re: Adjust multiple date formats

    again, its not the sort. I have a problem afterwards when i copy these entries to another sheet. Right now I use search and replace to replace the "-" with "." but that just mixes me up the date and months. asides of this, I am not the one who has to do that all the times, I need some colleagues who are not "exactly" into excel do this on a daily basis. Simply, the easier, the better.

    Thanks,
    A2k

  6. #6
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Adjust multiple date formats

    Post a workbook so we can see what is text and what are dates?
    Entia non sunt multiplicanda sine necessitate

+ 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