+ Reply to Thread
Results 1 to 7 of 7

Trouble with inconsistent date formats in Excel

  1. #1
    Registered User
    Join Date
    07-21-2013
    Location
    Madrid, Spain
    MS-Off Ver
    Excel 2007
    Posts
    3

    Trouble with inconsistent date formats in Excel

    Hello! I have some data for Spain's La Liga football league. While they are rank chronologically in the excel file, I believe the date formats are inconsistent (please see attached file). For example, in cell B2, the match between Albacete vs Osasuna takes place on 30 August 2003 (denoted by 30/08/03). However, in cell B12, the match between Osasuna v Valencia takes place on 2 September 2003 (denoted by 37661).

    I realize that converting 37661 from Cell B12 into 02/09/03 is easy (right click and format cells > date). However, I have a problem with the data on cell B2. I have tried to use this formula on B2:

    =REPLACE(B2,7,2,2003)

    to try to convert 30/08/03 into 30/08/2003 and then formatting the new cell as a date, but it does not seem to work.

    Moreover, I feel there must be an easier way to convert cell B2 into a date format than using the =REPLACE formula because that would force me to do this for every year, while in reality I just need to insert '20' after 'yy'.

    It is important for me to have the dates be inconsistent so that with the database, I will be able to track individual teams as they progress through the season regardless of whether they play at home or away, and not having to resort to ranking them chronologically based on where they play. Thank you for your help!

    Inconsistent Dates.xlsx

  2. #2
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Trouble with inconsistent date formats in Excel

    Select the Date column, goto Data>Text to columns... and on the 3rd step pick DMY from the column data format dropdown.

    Then you should have 'real' dates and you can format them as you like.
    If posting code please use code tags, see here.

  3. #3
    Registered User
    Join Date
    07-21-2013
    Location
    Madrid, Spain
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: Trouble with inconsistent date formats in Excel

    Thank you very much!

  4. #4
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Trouble with inconsistent date formats in Excel

    See the attached file.
    Attached Files Attached Files
    Notice my main language is not English.

    I appreciate it, if you reply on my solution.

    If you are satisfied with the solution, please mark the question solved.

    You can add reputation by clicking on the star * add reputation.

  5. #5
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: Trouble with inconsistent date formats in Excel

    I entered a formula in the column that I shaded yellow and copied down the column. Copy the column and then Paste Values to get rid of the formula. Delete the original formula.

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by newdoverman; 07-21-2013 at 11:48 AM.
    <---------If you like someone's answer, click the star to the left of one of their posts to give them a reputation point for that answer.
    Ron W

  6. #6
    Registered User
    Join Date
    07-21-2013
    Location
    Madrid, Spain
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: Trouble with inconsistent date formats in Excel

    Thank you all very much! I have learned new things today

  7. #7
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: Trouble with inconsistent date formats in Excel

    Thank you for the feedback. As you can see, there is more than one way to accomplish this as is usual for Excel.

+ 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: 1
    Last Post: 11-01-2012, 05:34 AM
  2. Splitting Names with inconsistent formats
    By andersonca in forum Excel General
    Replies: 2
    Last Post: 06-24-2009, 01:44 PM
  3. Changing date formats in Excel
    By fdoherty in forum Excel General
    Replies: 1
    Last Post: 07-12-2005, 10:05 AM
  4. [SOLVED] excel date formats changed
    By bob in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 03-01-2005, 11:06 AM
  5. Excel date formats
    By Legal Learning in forum Excel General
    Replies: 7
    Last Post: 01-04-2005, 04:06 PM

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