Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Re: Trying to Get a Negative Difference in Date

3,870 views
Skip to first unread message

Frank Kabel

unread,
Jun 14, 2004, 10:37:44 AM6/14/04
to
Hi
why not use a IF function to test them first. Something like
=IF(A1>B1,formula_for_late_return,other_formula)

--
Regards
Frank Kabel
Frankfurt, Germany


> I have a worksheet set up that has the "Due Date" and the "Date
> Returned."
>
> I'm trying to get the difference of the two to use to multiply by a
> static number to figure out an adjustment (basically a late fee).
>
> If the leaser returns the product early, he/she gets money back, if
> the product is returned late, then money is owed.
>
> TURNED IN: June-01-2004
> DUE IN: March-01-2004
>
> DIFF: -3
>
> OWED: $900
>
> I've used even and trunc... I can't use DATEDIF because it won't
> calculate negative dates...
>
> I need the difference of the dates calculated and rounded to the
> MONTH.
>
> Any help would be great!
> Thanks,
> Justin
>
>
> ---
> Message posted from http://www.ExcelForum.com/

Andy B

unread,
Jun 14, 2004, 10:39:16 AM6/14/04
to
Hi

You could try something like this:
=IF(C9>C8,DATEDIF(C8,C9,"m"),-DATEDIF(C9,C8,"m"))
which tests which date is later and then uses DATEDIF to work out the
difference. I've used a minus before the 'not true' option to
differentiate - otherwise both would give positive results.

--
Andy.


"jvanlaere >" <<jvanlaer...@excelforum-nospam.com> wrote in message
news:jvanlaer...@excelforum-nospam.com...

0 new messages