Please Note: This article is written for users of the following Microsoft Excel versions: 97, 2000, 2002, and 2003. If you are using a later version (Excel 2007 or later), this tip may not work for you. For a version of this tip written specifically for later versions of Excel, click here: Tombstone Date Math.

Tombstone Date Math

Written by Allen Wyatt (last updated February 28, 2022)
This tip applies to Excel 97, 2000, 2002, and 2003


1

Robert loves to work on genealogy. Sometimes when he finds an older cemetery, instead of the birth and death dates being visible on a tombstone, just one date is visible and an age. For example, "born: Jan 18, 1801, died 81 yrs, 11 mths, 17 days" or "age: 93 yrs, 8 mths, 22 days, died March 18, 1901." Robert is wondering if there is any way to calculate the missing date to the day.

There is a way to do this, but it doesn't involve the use of regular worksheet functions. While Excel includes a rich assortment of worksheet functions that allow you to manipulate dates, the "basis date" for Excel is January 1, 1901; this is the date from which all dates are calculated. (You can change the basis date, but only by three years, to 1904. This capability is provided for compatibility with Excel on the Mac.) This means that older dates—such as those you would find in the cemetery for genealogy purposes—can't be directly calculated in Excel.

Fortunately, VBA doesn't have this limitation. This means that you can easily create a user-defined function (a macro) that will do the math for you. Start by placing the starting date (either birth or death date) in cell B1. Then, in cells B2:B4 enter the number of years, months, and days by which you want to adjust the starting date. Thus, if B1 contains a birth date, then cells B2:B4 should be positive (you want to add them to the starting date). If B1 contains a death date, then B2:B4 should be negative (you want to subtract them from the starting date).

Then, create this macro:

Function FindDate(Start As Date, iYrs As Integer, _
  iMths As Integer, iDays As Integer)

    Application.Volatile
    Dim D As Date

    D = DateAdd("yyyy", iYrs, Start)
    D = DateAdd("m", iMths, D)
    D = DateAdd("d", iDays, D)

    FindDate = Format(D, "m/d/yyyy")
End Function

In whatever cell you want to display the calculated date you can enter the following formula:

=FindDate(B1,B2,B3,B4)

The result of the function is a formatted date that represents the start date adjusted by the years, months, and days you specify. So if cell B1 contains 1/18/1801, cell B2 contains 81, cell B3 contains 11, and cell B4 contains 17, then the function will return 1/4/1883. Similarly, if cell B1 contains 3/18/1901, cell B2 contains -93, cell B3 contains -8, and cell B4 contains -22, then the result returned will be 6/26/1807.

Note:

If you would like to know how to use the macros described on this page (or on any other page on the ExcelTips sites), I've prepared a special page that includes helpful information. Click here to open that special page in a new browser tab.

ExcelTips is your source for cost-effective Microsoft Excel training. This tip (5896) applies to Microsoft Excel 97, 2000, 2002, and 2003. You can find a version of this tip for the ribbon interface of Excel (Excel 2007 and later) here: Tombstone Date Math.

Author Bio

Allen Wyatt

With more than 50 non-fiction books and numerous magazine articles to his credit, Allen Wyatt is an internationally recognized author. He is president of Sharon Parq Associates, a computer and publishing services company. ...

MORE FROM ALLEN

Automatically Adding Tabs in Footnotes

When you add a footnote to a document, Word's normal formatting adds a space after the footnote number and before the ...

Discover More

Controlling Repagination in Macros

Want to turn off document repagination while your macro does its work? Here are two approaches you can use.

Discover More

Generating a Count of Word Occurrences

Do you need to know the frequency with which certain words occur in your documents? There is no built-in way to derive ...

Discover More

Save Time and Supercharge Excel! Automate virtually any routine task and save yourself hours, days, maybe even weeks. Then, learn how to make Excel do things you thought were simply impossible! Mastering advanced Excel macros has never been easier. Check out Excel 2010 VBA and Macros today!

More ExcelTips (menu)

Calculating TV Time

In some industries it is necessary to work with time resolutions of less than a second. If you need to keep track of such ...

Discover More

Converting UTC Times to Local Times

Dates and times are often standardized on UTC time, which is analogous to GMT times. How to convert such times to your ...

Discover More

Converting an Unsupported Date Format

Excel makes it easy to import information created in other programs. Converting the imported data into something you can ...

Discover More
Subscribe

FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."

View most recent newsletter.

Comments

If you would like to add an image to your comment (not an avatar, but an image to help in making the point of your comment), include the characters [{fig}] (all 7 characters, in the sequence shown) in your comment text. You’ll be prompted to upload your image when you submit the comment. Maximum image size is 6Mpixels. Images larger than 600px wide or 1000px tall will be reduced. Up to three images may be included in a comment. All images are subject to review. Commenting privileges may be curtailed if inappropriate images are posted.

What is six minus 4?

2017-08-26 07:13:33

Pieter de la Court

Any year numbers smaller than 100 (i.e. years 0001 to 0099) are misinterpreted by the year function as 1901 to 1999)


This Site

Got a version of Excel that uses the menu interface (Excel 97, Excel 2000, Excel 2002, or Excel 2003)? This site is for you! If you use a later version of Excel, visit our ExcelTips site focusing on the ribbon interface.

Newest Tips
Subscribe

FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."

(Your e-mail address is not shared with anyone, ever.)

View the most recent newsletter.