Mysterious date format change - help pls!

juliet_jia

New Member
Joined
Sep 1, 2011
Messages
7
Hi all,

From many daily reports, I copy some data into a master excel file. These data include dates with different formats, e.g. 15/10/2011 or 15/10 (date/month) or 1400/09 (time/date) or sometimes only 05 (date). All these are pasted special as values into the master file.

The problem comes when I clean up these different formats - I don't make changes to the original pasted-in data, but only add columns next to it. BUT the original values always changes when macros are ran!! Troubles are in those cells only with dates in:

E.g. 05 will be shown as 05/01/1900 in the 1st round, then sometimes will change to 01/05/1900 (i.e. month and date shifts position)....... if the date is >12, no month-date mess though of course.

Any one has ANY inputs will be very much appreciated!

Many thanks
Juliet
 

Excel Facts

When did Power Query debut in Excel?
Although it was an add-in in Excel 2010 & Excel 2013, Power Query became a part of Excel in 2016, in Data, Get & Transform Data.
Dates are held as the number of days since 01/01/1900 ("05 will be shown as 05/01/1900 in the 1st round") and what you see depends on the way the cells are formatted. Formatting a cell does not change the value in the cell - only the way it is displayed.
Perhaps you should format the cells in the master workbook before pasting as 'values'?
Have a look at the following for more information:
http://www.cpearson.com/excel/datetime.htm
 
Upvote 0

Forum statistics

Threads
1,214,968
Messages
6,122,506
Members
449,089
Latest member
RandomExceller01

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