Date Formatting Issue - Different formats recognised in a column

malevasquez

New Member
Joined
Aug 17, 2020
Messages
2
Office Version
  1. 365
Platform
  1. MacOS
Hi everyone!
This is my first post here so I apologise in advance if there's anything wrong. I received an xlsx file which contains around 23000 rows and several columns, one of which is dates. For some reason, some cells aren't recognised with this format and, no matter what I try, they don't change. Below I attach some images for better explanation.
Screen Shot 2020-08-17 at 04.14.18.png

This is how it appears when I open the file. The shifted cells repeat themselves like a pattern throughout it all. When I try to change the format into anything (in this case year), some cells change and some don't.
Screen Shot 2020-08-17 at 04.14.54.png

I've searched for answers and tried everything (text to column, VALUE, DATEVALUE, formatting option) and more but no
 

Excel Facts

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.
it looks like some of those dates are actually Just text
Dates are numbers starting from 01/01/1900
If you change the format of the column to General or Number - then you will see some stay as dates and these are the text values
you will need to setup a formula to a new column
so in a new column put a formula
Assuming the dates start in A2
=IFERROR(DATEVALUE(A2),A2)

DATEVALUE should work OK
Now on the new column
copy the column
and paste>special>value into the old column

now you should be fine

Book1
ABCD
1DATE -Some TEXTCONVERSIONDate
21/1/20438311/1/20
31/3/20438331/3/20
41/2/20438321/2/20
51/4/20438341/4/20
61/3/20438331/3/20
705/01/2020438351/5/20
804/01/2020438341/4/20
91/6/20438361/6/20
101/5/20438351/5/20
111/7/20438371/7/20
1206/01/2020438361/6/20
1308/01/2020438381/8/20
1407/01/2020438371/7/20
151/9/20438391/9/20
161/8/20438381/8/20
171/10/20438401/10/20
181/9/20438391/9/20
191/11/20438411/11/20
201/10/20438401/10/20
211/12/20438421/12/20
221/11/20438411/11/20
Sheet1
Cell Formulas
RangeFormula
C2:C22C2=IFERROR(DATEVALUE(A2),A2)
D2:D22D2=C2
 
Upvote 0
Not so fast on that formula 'etaf'. If I am not mistaken, even the values that were changed to real dates were changed to the wrong real dates and need to be corrected as well. Note which ones remained unchanged... the day value was greater than 12 which indicates to me that for the ones that did change the day and month values got reversed in the conversion. For example, the first date shows as 1/02/1965 (which on the original system was January 2nd) but I'll bet on the OP's system it has become February 1st.
 
Upvote 0
Thanks Rick Rothstein, as you say looks a US format v Europe format of dates , that maybe why datevalue() was not working correctly
@malevasquez -
What date format do you use on your system DD/MM/YYYY or MM/DD/YYYY, and where does the file come from, ? is it in excel format or csv, you say its send as xlsx
As Rick Rothstein
Says - the dates that are formatted correctly may actually be wrong because of the US v UK format
 
Upvote 0
Thanks Rick Rothstein, as you say looks a US format v Europe format of dates , that maybe why datevalue() was not working correctly
@malevasquez -
What date format do you use on your system DD/MM/YYYY or MM/DD/YYYY, and where does the file come from, ? is it in excel format or csv, you say its send as xlsx
As Rick Rothstein
Says - the dates that are formatted correctly may actually be wrong because of the US v UK format
Thank you both for being so helpful. My system uses DD/MM/YYYY, which might be an issue considering the file uses MM/DD/YYYY. Originally the file is downloaded in .csv from a website (Significant Earthquakes, 1965-2016), but I receive the .xlsx. However, I can access either one if needed.
 
Upvote 0

Forum statistics

Threads
1,214,599
Messages
6,120,453
Members
448,967
Latest member
grijken

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top