Site menu:

Categories

Archives

Site search

Recent Comments

Excel Dates Incompatible from PC to Mac?

I discovered an amazing “bug” in excel tonight. I needed to create a copy of part of a spreadsheet into a new sheet. See if you can spot the difference between the original on the left and the new spreadsheet on the right:

before.png

You’ll notice that the dates are off by exactly 4 years and 1 day after a simple cut-and-paste into a fresh spreadsheet. It took a little while to figure out why this was happening.

First, a little background. When you write a date in excel, it stores the date as the number of days that have passed since either Jan 1, 1900 (on the PC) or since Jan 1, 1904 (on the Mac). Not surprisingly, this can cause problems between the two systems.

So, if you open a PC originated spreadsheet on a mac, it automatically uses the PC starting date (1900). If, however, you happen to make a new spreadsheet on that mac and cut-and-paste the dates to that new sheet, you’ll notice that the dates are off by 4 years and 1 day. Why the one day? Apparently that came down to a leap-year related difference between the two systems.

Fortunately, it’s easy to fix. If you’d like to conform your Mac spreadsheet to the PC system, simply open up Preferences->Calculation->Workbook Options an uncheck “1904 Date System”:

Workbook Options

Your PC originated spreadsheet and your Mac originated spreadsheet will now match.

after.png

If you care, you can read a few more gory details on this Microsoft article on the date system.

Comments

Comment from Jason
Time: March 16, 2008, 8:05 pm

A little odd but its a proven fact Microsoft enjoys complication.

Comment from Amy
Time: June 25, 2008, 12:44 pm

Oh my God — Thank you! This has driven me nuts. I’m on a Mac exchanging Excel income and expense statements with our Financial Manager who’s on a PC, and this happens every time. I keep changing the dates, but now the problem is cured!

Write a comment