Everyday Computing Advanced Computing The Internet At Home Health, Mind & Body Making & Managing Money Sports & Leisure Travel Beyond The Classroom
Handheld Computing
Hardware
Money Management Software
Multimedia
Office Productivity Software
Operating Systems
Moms, Dads, and Grads -- Win $500!
Excel 2007 Just the Steps For Dummies

Using Dates in Excel Calculations


Adapted From: Excel 2007 Just the Steps For Dummies

Excel can manipulate dates — you can add and subtract dates almost as easily as adding 2 and 2. Here's a brief example that shows you how:

1. Enter a date into a cell.

You can format the date any way you want.

2. Enter another date into another cell.

To have the cell dynamically display the current date, enter =Now(). To enter today's date as a static entry, press Ctrl+; (semicolon). To enter the current time as a static value, press Ctrl+: (colon).

3. To find the difference between the two dates, create a formula that subtracts one date from another.

For example, if you put the first date in cell A1 and the other date in cell A2, then in cell A3 or wherever you want the difference to appear, enter =A1-A2. Excel returns a value, but it's formatted in a date pattern rather than in a numerical pattern (which is what you want). Your answer is probably some date at the beginning of the 20th century.

To calculate the number of days between a specific date and the present time, enter the specific date in a cell, such as A1, and then in another cell, enter the formula =A1-NOW() if you're calculating a future date, or =NOW()-A1 if you're calculating a past date.

4. With the answer cell (A3) selected, choose Home, Font, Number Format in Excel 2007, or choose Format, Cells in earlier versions.

5. Select Number.

Excel changes the date value to a numerical value.

The reason Excel initially returned an unusual date is that Excel stores dates as serialized values beginning with day 0 at December 31, 1899. When you create a formula involving date formats, Excel naturally returns a date format.

Related Articles
Standardizing Upper- and Lowercase with Excel Formulas
Excel Formulas: Leaving Decimals Behind with INT
Excel Formulas: Ignoring Signs with the ABS Function
Excel Formulas: Generating Random Numbers
Finding the Correct Excel Function
Related Titles
Office 2007 For Dummies
More Microsoft Office 2000 for Windows For Dummies
Office XP For Dummies
Office 2003 All-in-One Desk Reference For Dummies
Excel 2003 Formulas