> Try in C1: =DAY(ABS(A1-B1))-1
That method will work only if the difference between the two
dates is <= 31 days. Better to simply subtract one date from the
other, and format for General.
--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com
"Max" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Perhaps this might be of help ..
>
> Assume the *dates* "2-Aug-2004" and "30-Jul-2004"
> are input in A1 and B1, and
> A1:B1 is custom formatted as: mm/dd
> viz. it'll show as:
>
> In A1: 08/02
> In B1: 07/30
>
> Try in C1: =DAY(ABS(A1-B1))-1
> Format C1 as: General or Number
>
> C1 will return: 2
> i.e. the number of days in-between the 2 dates in A1:B1
> --
> Rgds
> Max
> xl 97
> ---
> Please respond in thread
> xdemechanik <at>yahoo<dot>com
> ----
> "EXCEL$B!!(BNEWS" <(E-Mail Removed)> wrote in message
> news:#$lr$(E-Mail Removed)...
> > hi,
> >
> > i have two cells ,in which there are two dates.
> > (for instance ,one cel l 08/02 ,the other 07/30)
> >
> > if the gap of the two dates is 2 days , something will be set
to do.
> >
> > but it is difficult to judge the the substraction between two
dates
> >
> > any good ideas.
> >
> > thanks
> >
> >
> >
>
>