# Thread: Time Formula Problem (2003)

1. ## Time Formula Problem (2003)

Good evening
I am sure that this is a very simple problem to solve but I can not get it.
I attach a sample speadsheet explaining what I have in mind. In short it is spreading a budget out over months.
I have a start date, end date and amount. I want the amount spread over the months from the start date to the end date, both months included.
Any help will be appreciated.

Regards

2. ## Re: Time Formula Problem (2003)

Enter this formula in D4:
<code>
=IF(AND(D\$2>=\$A4,D\$2<=\$B4),\$C4/(DATEDIF(\$A4,\$B4,"M")+1),"")
</code>
and fill down, then right.

3. ## Re: Time Formula Problem (2003)

Hans

Thank you very much. I have one question: I can not find the DATEDIF function on my help file. Can you just shortly explain what it does and the purpose of "M"
Thank you again

4. ## Re: Time Formula Problem (2003)

<img src=/S/grin.gif border=0 alt=grin width=15 height=15>

DATEDIF has been present in all recent versions of Excel, but it has not been mentioned in the help files or in the Function Wizard except in Excel 2000. Nobody knows why. The syntax is

=DATEDIF(date1, date2, interval)

interval = "M" means the date difference in months.

See DATEDIF Function for more info.

5. ## Re: Time Formula Problem (2003)

Hans

Thank you very much, very informative and very usefull.

Have a good evening

Regards

#### Posting Permissions

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