Sunday, February 20, 2011

Excel - Copied Cells with Dates are 4 Years Off

I'm still working on my first end of year data for my little online shop and have recently become quite dumbfounded by Excel. It seems that no matter what I would do I could not copy data in any form (single row, whole worksheet, etc) without the date being off by 4 years and one day. Yeah, that's a bit of a problem. I actually did look into this odd occurrence before, but could not find any online data that wasn't in "geek speak" so I wound up manually changing the dates. 

BUT ALAS!!! I FOUND THE ANSWER. Although I still have to wonder why this would happen. Anyway here it is. Simple as pie and you can quit pulling your hair out!!

  1. In any empty cell, enter 1462
  2. Copy the cell containing the 1462
  3. Select all the cells with messed up dates
  4. Right click and select PASTE SPECIAL
  5. Select the VALUE button
  6. Select ADD button if your dates are 4 years behind or the SUBTRACT button if they are 4 years ahead.

Whallah! The 1492 value isn't needed anymore so you can delete it. I'm still lost as to exactly why this happened to me, but at least now I know how to fix it!

 ______________________________________________________________________
The following information was copied from the help window of Excel 2007 - (I colored the actual instructions in red within the text):

Issue: I'm having problems with dates between workbooks that use different date systems

You can encounter problems when you copy and paste dates or when you create external references between workbooks based on the the two different date systems. Dates can appear four years and one day earlier or later than the date that you expect. You can encounter these problems whether you are using Microsoft Excel for Windows, Excel for the Macintosh, or both programs.
For example, if you copy the date July 5, 2007 from a workbook that uses the 1900 date system and then paste the date into a workbook that uses the 1904 date system, the date appears as July 6, 2011, which is 1462 days later. Alternatively, if you copy the date July 5, 2007 from a workbook that uses the 1904 date system and then paste the date into a workbook that uses the 1900 date system, the date appears as July 4, 2003, which is 1462 days earlier. For background information, see Learn about the two date systems .
Correct a copy and paste problem  
  1. In an empty cell, enter the value 1462.
  2. Select that cell, and then on the Home tab, in the Clipboard group, click Copy.
  3. Select all of the cells that contain the incorrect dates.
To select Do this
A single cell Click the cell, or press the arrow keys to move to the cell.
A range of cells Click the first cell in the range, and then drag to the last cell, or hold down SHIFT while you press the arrow keys to extend the selection.
You can also select the first cell in the range, and then press F8 to extend the selection by using the arrow keys. To stop extending the selection, press F8 again.
A large range of cells Click the first cell in the range, and then hold down SHIFT while you click the last cell in the range. You can scroll to make the last cell visible.
All cells on a worksheet Click the Select All button.
Select All button
To select the entire worksheet, you can also press CTRL+A.
 Note   If the worksheet contains data, CTRL+A selects the current region. Pressing CTRL+A a second time selects the entire worksheet.
Nonadjacent cells or cell ranges Select the first cell or range of cells, and then hold down CTRL while you select the other cells or ranges.
You can also select the first cell or range of cells, and then press SHIFT+F8 to add another nonadjacent cell or range to the selection. To stop adding cells or ranges to the selection, press SHIFT+F8 again.
 Note   You cannot cancel the selection of a cell or range of cells in a nonadjacent selection without canceling the entire selection.
An entire row or column Click the row or column heading.
Worksheet showing row heading and column heading
Callout 1 Row heading
Callout 2 Column heading
You can also select cells in a row or column by selecting the first cell and then pressing CTRL+SHIFT+ARROW key (RIGHT ARROW or LEFT ARROW for rows, UP ARROW or DOWN ARROW for columns).
 Note   If the row or column contains data, CTRL+SHIFT+ARROW key selects the row or column to the last used cell. Pressing CTRL+SHIFT+ARROW key a second time selects the entire row or column.
Adjacent rows or columns Drag across the row or column headings. Or select the first row or column; then hold down SHIFT while you select the last row or column.
Nonadjacent rows or columns Click the column or row heading of the first row or column in your selection; then hold down CTRL while you click the column or row headings of other rows or columns that you want to add to the selection.
The first or last cell in a row or column Select a cell in the row or column, and then press CTRL+ARROW key (RIGHT ARROW or LEFT ARROW for rows, UP ARROW or DOWN ARROW for columns).
The first or last cell on a worksheet or in a Microsoft Office Excel table Press CTRL+HOME to select the first cell on the worksheet or in an Excel list.
Press CTRL+END to select the last cell on the worksheet or in an Excel list that contains data or formatting.
Cells to the last used cell on the worksheet (lower-right corner) Select the first cell, and then press CTRL+SHIFT+END to extend the selection of cells to the last used cell on the worksheet (lower-right corner).
Cells to the beginning of the worksheet Select the first cell, and then press CTRL+SHIFT+HOME to extend the selection of cells to the beginning of the worksheet.
More or fewer cells than the active selection Hold down SHIFT while you click the last cell that you want to include in the new selection. The rectangular range between the active cell (active cell: The selected cell in which data is entered when you begin typing. Only one cell is active at a time. The active cell is bounded by a heavy border.) and the cell that you click becomes the new selection.
 Tip   To cancel a selection of cells, click any cell on the worksheet.

  1. On the Home tab, in the Clipboard group, click Paste, and then click Paste Special.
Excel Ribbon Image
  1. In the Paste Special dialog box, under Paste, click Values, and then under Operation, do one of the following:
    • To set the date as four years and one day later, click Add.
    • To set the date as four years and one day earlier, click Subtract.
Correct an external reference problem  
If you are using an external reference to a date in another workbook with a different date system, you can modify the external reference by doing one of the following:
  • To set the date as four years and one day later, add 1462 to it. For example:
=[Book2]Sheet1!$A$1+1462
  • To set the date as four years and one day earlier, subtract 1462 from it. For example:
=[Book1]Sheet1!$A$1-1462

4 comments:

Anonymous said...

wOW..i HAD THIS EXACT PROBLEM...YOU SAVED ME. tHANKS

Victor said...

Or you can turn off (or on) "Use 1904 date system" in Excel Options.

SalientNZ said...

Thanks a lot for this. Just what I needed to know.
Cheers,
Brent.

Joel Munson said...

Thank you!!!!