Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
jc jc is offline
external usenet poster
 
Posts: 164
Default Date changes when copied and pasted

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!


  #2   Report Post  
Posted to microsoft.public.excel.misc
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
  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,268
Default Date changes when copied and pasted

It might be a good idea to format the cell where the OP puts the 1462 as a
date as well,
that way there won't be a serial number as the result


--


Regards,


Peo Sjoblom



"Dave Peterson" wrote in message
...
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



  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default Date changes when copied and pasted

Or paste special|Check add (or subtract) AND check Values


Peo Sjoblom wrote:

It might be a good idea to format the cell where the OP puts the 1462 as a
date as well,
that way there won't be a serial number as the result

--

Regards,

Peo Sjoblom

"Dave Peterson" wrote in message
...
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


--

Dave Peterson
  #5   Report Post  
Posted to microsoft.public.excel.misc
jc jc is offline
external usenet poster
 
Posts: 164
Default Date changes when copied and pasted

Thanks very much. That makes sense. I was aware of the PC/Mac difference
but it didn't register as a possible cause. Will try your solution and hope
all goes well.

"Dave Peterson" wrote:

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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Can cell formats be copied and pasted into Coreldraw? kelowna_james Excel Discussion (Misc queries) 1 March 21st 07 02:52 AM
Cell reference update when copied and pasted Dave Excel Worksheet Functions 1 April 5th 06 08:52 PM
Password protection of worksheet when copied and pasted. Shansi Excel Worksheet Functions 1 July 30th 05 12:23 AM
How do I protect a worksheet from being copied & pasted? JJ Excel Discussion (Misc queries) 3 July 28th 05 02:07 PM
Formatting information copied and pasted from the WEB to excel jbsand1001 Excel Discussion (Misc queries) 5 April 5th 05 09:07 PM


All times are GMT +1. The time now is 11:07 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"