Works: Adding Days to a Date in the Spreadsheet (107189)



The information in this article applies to:

  • Microsoft Works 3.0
  • Microsoft Works 3.0a
  • Microsoft Works 3.0b
  • Microsoft Works 4.5
  • Microsoft Works 4.5a
  • Microsoft Works for Windows 95, version 4.0
  • Microsoft Works for Windows 95, version 4.0 4.0a

This article was previously published under Q107189

SUMMARY

To add or subtract a certain number of years, months, and/or days to a date in a Works spreadsheet, use the following formula:

=Date(Year(ref)+years,Month(ref)+months,Day(ref)+days)

In the above formula, the years, months, and days are integers, and "ref" is a spreadsheet cell reference. If the formula returns an "ERR", the resulting date is probably out of the valid date range for Works, which is 1/1/1900 to 6/3/2079.

MORE INFORMATION

For example, if cell A1 contains the date 1/1/89, use the following formula to find the date 3 years, 1 month, and 5 days later:

=Date(Year(A1)+3,Month(A1)+1,Day(A1)+5)

The result of this formula is the serial number 33640. It displays as "February 6, 1992" when you select the Time/Date format using the following steps:

  1. From the Format menu, click Number.
  2. In the Format box, click Date.
  3. In the Date Options box, select the date format you prefer.
  4. Choose OK.
NOTE: If the date appears as "#" signs in the spreadsheet, you need to increase the width of the column to display the date.

REFERENCES

For more information about how to perform this task in Works, see your Works printed documentation or online Help.

"Microsoft Works for Windows User's Guide," version 3.0, Appendix A.


Modification Type:MajorLast Reviewed:11/15/2004
Keywords:kbhowto kbinfo KB107189