Solved

Using dates prior to 1900 in Excel

Posted on 2014-10-16
7
100 Views
Last Modified: 2014-10-30
Hello,

Since the Windows date system begins with # 1 on January 1, 1900, can negative numbers be used for dates in the 1800's and earlier? If not, is there a workaround or add-on which enables earlier dates to be used in Excel charts & formulas, etc?

I began adding 2000 to all years whenever dates prior to 1900 are present in a range of values. Then, I would just need to remember to subtract 2000 whenever the date was to be displayed. I think that's accurate considering the rules for leap year but doing that is a couple of extra steps and it would be nice if there is a simpler way to handle that situation.

Thanks
0
Comment
Question by:WeThotUWasAToad
7 Comments
 
LVL 80

Accepted Solution

by:
byundt earned 250 total points
ID: 40385990
VBA will support negative numbers as dates, but Excel worksheets will not.

Your workaround of adding 200 years is fine, as long as you take note of the fact that Excel worksheet recognizes February 29, 1900 as a Leap Day (to be compatible with Lotus 123), while VBA knows that there is no Leap Day that year.

Entertaining story describing the origin of VBA in Excel. Of particular note is the discussion on dates.
0
 
LVL 25

Assisted Solution

by:ProfessorJimJam
ProfessorJimJam earned 250 total points
ID: 40386241
@WeThotUWasAToad

there is a free add-in by John Walkenbach that solves your problem, check the link below.


http://j-walk.com/ss/excel/files/xdate.htm
0
 
LVL 24

Expert Comment

by:Phillip Burton
ID: 40386341
Generally, you should only increment in groups of 28 years. That's because, with the leap days, if 1 January 2000 is a Saturday (which it is), then so will 1 January 2028, and 1 January 2056. You can't guarantee it if you don't jump to the similar cycle in the future.

Just to add to byundt's point, February 29, 1900 did not in fact exist, so VBA is right and Excel is wrong.
0
Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 
LVL 31

Expert Comment

by:Rob Henson
ID: 40386411
There was no 29 Feb 2000 either.

As you are no doubt aware, leap years occur every 4 years except for centenary years.

The addition of a day every 4 years would add 25 days per century but the movement of the planets only needs 24, hence no leap year in centenary years.

Thanks
Rob
0
 
LVL 24

Expert Comment

by:Phillip Burton
ID: 40386461
You need a new 2000 calendar - There was a 29 Feb 2000!

The movement on the planets actually needs about 24.25, so there is a leap day every 400 years.
0
 
LVL 31

Expert Comment

by:Rob Henson
ID: 40386478
Indeed there was, apologies I rearranged what I was writing and ended up writing it wrong.

Thanks for the correction.
0
 

Author Closing Comment

by:WeThotUWasAToad
ID: 40414287
Thanks for the insights & suggestions.
0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

What is a Form List Box? (skip if you know this) The forms List Box is the alternative to the ActiveX list box. If you are using excel 2007, you first make sure you have a developer tab (click the Orb)->"Excel Options"->Popular->"Show Developer tab…
This tutorial explains how to create a series of drop-down lists that are dependent upon prior selections to guide (“force”) the user to make the correct selection and reduce data errors within Microsoft Excel. Excel 2010 was used for this tutorial;…
This Micro Tutorial will demonstrate on a Mac how to change the sort order for chart legend values and decrpyt the intimidating chart menu.
This Micro Tutorial will demonstrate how to create pivot charts out of a data set. I also added a drop-down menu which allows to choose from different categories in the data set and the chart will automatically update.

706 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now