+ Reply to Thread
Results 1 to 5 of 5

date format cell

  1. #1
    Forum Contributor
    Join Date
    08-06-2014
    Location
    iran
    MS-Off Ver
    2016
    Posts
    110

    date format cell

    hi i have an excel data that first column is date and secound and third column is coresponding time and height
    how can i changed all the format of date in to one format dd/mm/yyyy
    because some of them is in mm/dd/yyyy format. i attached image and excel file.
    (dd/mm/yyyy time height)
    thanks so much
    regard
    Attached Images Attached Images
    Attached Files Attached Files

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: date format cell

    Hi,

    Are you saying that A284:A287 are 12 January 2012 and A288:A292 are 13 January 2012?
    I agree that might seem obvious from the order of the data but how is Excel to determine that? As a human being you intuitively know that the position of the day and month from 287 to 288 have reversed but it would be non trivial to express that in a formula.

    The obvious first question is why is your data mixed up like this. Is it not possible to get the data in a regular format?
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,942

    Re: date format cell

    It also looks like it could be showing 1 Dec 2012 and the 13 Jan 2012. How would we (or excel), know if that was right or wrong?
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  4. #4
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,787

    Re: date format cell

    It seems to me that where the day in any particular month is 13th or higher, then the correct date is shown, but if the day is 12 or less then the month and day have been transposed. You can put this formula in D1:

    =IF(DAY(A1)>12,A1,DATE(YEAR(A1),DAY(A1),MONTH(A1)))

    Format that cell as a date dd/mm/yyyy, and copy down by double-clicking on the fill handle (the small black square in the bottom right corner of the cursor, with D1 selected).

    Then you can fix the values in that column (Copy | Paste Special | Values | OK, then press the <Esc> key), and then you can copy column D to paste over the values in column A.

    Hope this helps.

    Pete

  5. #5
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,787

    Re: date format cell

    Thanks for the rep.

    If that takes care of your original question, please select Thread Tools from the menu above your first post and mark this thread as SOLVED.

    Pete

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 2
    Last Post: 10-11-2015, 06:06 AM
  2. Replies: 2
    Last Post: 06-02-2015, 08:42 AM
  3. Show Error when a cell with number format change to date format
    By delroba in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 03-08-2015, 02:57 AM
  4. Replies: 1
    Last Post: 12-09-2014, 05:06 AM
  5. Replies: 3
    Last Post: 11-23-2013, 06:21 AM
  6. Replies: 1
    Last Post: 11-01-2012, 10:37 AM
  7. Replies: 2
    Last Post: 10-02-2010, 04:41 AM

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