# Thread: formula help

1. ## formula help

hi all,

i need a formula that compute the time between 4 date columns that are bsed on year & month and produce the results in the last column.

2. DubDub,

Interestingly this works! It surprised me but the way you are calculating it does.
=(\$C3-\$A3)*12+(\$D3-\$B3)
dubdub.JPG
HTH

3. thank you RG. for your help and prompt response.

4. Hi RG/dubdub

You may be interested in a more 'general purpose' date calculation:
DATEDIF is an "undocumented" function which means it is not listed
with other Date functions under the formula tab in Excel.

The DATEDIF function can be used to calculate the time period or difference between two dates.
This time period can be calculated as the number of days, months, or years between the two dates

To use DATEDIF you must type it manually into a cell on the worksheet rather than using the dialog box method available for other functions.
The syntax for the DATEDIF function is:

=DATEDIF(startDate,endDate,"interval")

..where "interval" can be "D", "M" or "Y" for days, months or years respectively.

The Interval argument can also contain a combination of days, months, and years in order to increase the variety of answers returned by the function.
•"YM" - calculates the number of months between two dates as if the dates were in the same year
•"YD" - calculates the number of days between two dates as if the dates were in the same year
•"MD" - calculates the number of days between two dates as if the dates were in the same month and year

I have attached a version of your file with the DATEDIF function..

zeddy

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•