View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default Date changes when copied and pasted

Saved from a previous post:

One workbook was using a base year of 1900 and the other was using 1904.
(tools|options|calculation tab|1904 date system)

One way to add those four years back is to find an empty cell, put 1462 into
that cell.

Copy that cell.

Select your range that contains the dates. Edit|PasteSpecial|click Add (in the
operation box).

You may have to reformat the cell as a date (mine turned to a 5 digit number).
But it should work.

You may want to do it against a copy...just in case.

(I'm not sure which one you'll fix. You may want to edit|pastespecial|click
subtract.)

Most windows users use 1900 as the base date. Mac users (mostly??) use 1904 as
the base date.


JC wrote:

I am having a problem where when copying rows that contains a date field into
another workbook, the date actually changes (usually by minus 4 years and 1
day eg 04/10/2008 becomes 03/10/2004). The first workbook is an export from
another program which we receive by email and is a csv file when received.
It then has a VBA macro run over it that deletes unwanted columns, rearranges
columns and formats some columns to text (not the date field) before pasting
into another workbook.

The problem is intermittent but seems to be dependent on what order the
workbooks are opened in. Otherwise can only be solved by either closing
Excel and starting again and sometimes only by restarting the computer. Can
anyone help!


--

Dave Peterson