Link to home
Start Free TrialLog in
Avatar of Jase Alexander
Jase AlexanderFlag for United Kingdom of Great Britain and Northern Ireland

asked on

Date formatting from US to UK when cell is being read numerically instead of date format ?

HI Guys

Hope you can help

Im having trouble converting a column with US dates as the section where it converts to UK dates still reads the data in numeric form (ie. instead of 08/01/2016 it still thinks the cell has 42325 (or whatever the conversion may be) as the result)

I have attached the sheet in question

Basically, the data gets pasted in and Column M contains the US dates
Column AT pulls the in the date whilst Column AU switched the date around to UK and then formats it in AV in order to split it into the yellow section for financial purposes.
However, when I paste the data in, and column AT populates the dates, column AU still believes the date in AT to be in numeric form and no matter how much I try to pre-format the cells, I cannot get this to change correctly.

Do you guys have any ideas as how to overcome this or is there a simpler method of converting the US date to UK format?

J
EE_Example.xlsm
Avatar of John
John
Flag of Canada image

Dates as a number within the sheet are independent of format.

Set the format of the target column as UK format and when you paste data into it, use Paste Special, Values and they should then get the new format
Avatar of yo_bee
Right click on the column and select format.
Under Local change it to  English(United Kingdom)

User generated image
If you paste US date into UK date, US date will be pasted in. You need to paste. special, values to keep the target formatting
ASKER CERTIFIED SOLUTION
Avatar of Ejgil Hedegaard
Ejgil Hedegaard
Flag of Denmark image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
What I am missing here?

In Col. AT, you have formula =IF(M2="","",M2) to fetch the dates from col. M which are in US date format. Right?
Then why not custom format the col. AT itself with "dd/mm/yyyy" to show the dates in UK format?
And then in AW2 you can use the formula =TEXT(AT2,"mmm-yy") to show the date in AT2 as Mon-Year or whatever format you like.

Point to remember is by changing the date format doesn't change the underlying date in anyway, the date remains the same. Also excel treats dates as numbers, which you can see if you format a date cell with General format.
When dates as text from another system are pasted, Excel tries to help, and converts what looks as a date to a date, so when US dates has month <= 12, it is converted to UK dates, but when month > 12, it is pasted a text.
08/12/2016 will convert to 08-12-2016, but should be 12-08-2016.
08/13/2016 will be the text "08/13/2016" but should be 13-08-2016.
The formula above checks if it is a date (numeric), and switch day and month, and if it a text, extracts the year, month and day to make a real date.
Avatar of Jase Alexander

ASKER

This worked perfect

Thank you so much (and everyone) for your help

Much appreciated

J
If it is text values being pasted in, you can then use the Text to Columns wizard to convert to numbers.

In step 3 of the wizard, in the left hand side choose Date and then choose the dropdown for MDY which tells the conversion that the source is in US format. This will then ensure that all dates are inserted correctly.

The conversion to UK format can then be a simple =IF(M2="","",M2) as mentioned by neeraj above and then format this column as UK format.