+ Reply to Thread
Results 1 to 3 of 3

Inconsistent date format

  1. #1
    Forum Contributor heytherejem's Avatar
    Join Date
    07-06-2017
    Location
    Hampshire, England
    MS-Off Ver
    2016
    Posts
    152

    Inconsistent date format

    Hi everyone,

    I have a date column but some have the dd/mm/yyyy in UK format separated by / and others have mm-dd-yyyy in US format separated by a -.

    I've tried text to columns ensuring it's date DMY but that does nothing, I've tried converting to text then doing a =datevalue which just errors, =value doesn't work either on the US entries.

    (btw I'm in the UK)

    I think I'm going to need a column next to the date column which has a formula to make the dates all the same, but my tiny little mind doesn't know how.

    Can someone please save me?

    Attached is my date column of doom.

    Jem
    Attached Files Attached Files

  2. #2
    Forum Guru samba_ravi's Avatar
    Join Date
    07-26-2011
    Location
    Hyderabad, India
    MS-Off Ver
    Excel 2021
    Posts
    8,914

    Re: Inconsistent date format

    B2=IF(COUNT(A2),DATE(YEAR(A2),DAY(A2),MONTH(A2)),DATE(RIGHT(A2,4),LEFT(A2,2),MID(A2,4,2)))
    Try this and copy towards down
    Attached Files Attached Files
    Samba

    Say thanks to those who have helped you by clicking Add Reputation star.

  3. #3
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,253

    Re: Inconsistent date format

    In B2

    =IF(ISNUMBER(SEARCH("-",A2)),DATE(RIGHT(A2,4),LEFT(A2,2),MID(A2,4,2)),A2)

    copy down

    Format column as Date
    Attached Files Attached Files

+ 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. Two inconsistent date ranges
    By Inzy in forum Excel General
    Replies: 1
    Last Post: 09-05-2016, 12:34 PM
  2. Inconsistent CSV date and cash formats generating errors
    By Ochimus in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-31-2016, 07:37 PM
  3. Macro to format this inconsistent spreadsheet
    By zsprowls in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-23-2014, 05:09 PM
  4. Trouble with inconsistent date formats in Excel
    By chifoobear in forum Excel General
    Replies: 6
    Last Post: 07-21-2013, 11:50 AM
  5. Translating an inconsistent text string to time format.
    By graveyardshiftee in forum Excel General
    Replies: 2
    Last Post: 02-21-2012, 05:42 AM
  6. Inconsistent conditional format with negative values
    By MoxieQA in forum Excel General
    Replies: 2
    Last Post: 10-17-2008, 01:07 AM
  7. [SOLVED] Inconsistent CSV export format
    By RichardOKeefe in forum Excel General
    Replies: 6
    Last Post: 05-10-2006, 12:20 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