Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Using dates prior to 1900 in Excel

Posted on 2014-10-16
7
Medium Priority
?
122 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 81

Accepted Solution

by:
byundt earned 1000 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 27

Assisted Solution

by:ProfessorJimJam
ProfessorJimJam earned 1000 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
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
LVL 34

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 34

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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This code takes an Excel list of URL’s and adds a header titled “URL List”. It then searches through all URL’s in column “A”, looking for duplicates. When a duplicate is found, it is moved to the top of the list. The duplicate URL’s are then highlig…
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

824 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