#1   Report Post  
Posted to microsoft.public.excel.misc
Rob Rob is offline
external usenet poster
 
Posts: 718
Default DateDif Question

I using DATE(Cell1,Cell2,"d"), the result is always 0.

I used the evalute forumula and here is what it says :

Datedif(39236,39266, "d"). How can the result be 0. Cell1 and Cell2 are
calculated fields with a format of custom (mmm dd yyyyy). I have tried
changing the format to date but still the same effect.

The calculations in the cell1 and cell2 are Date(Year(cell5),
Month(cell5)+1, Day(cell6).

Help - this is driving me crazy.
  #2   Report Post  
Posted to microsoft.public.excel.misc
Max Max is offline
external usenet poster
 
Posts: 9,221
Default DateDif Question

Try it with a little coercion:
=DATEDIF(A1+0,B1+0, "d")
assuming source dates in A1, B1 (earlier/later dates)
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"Rob" wrote:
I using DATE(Cell1,Cell2,"d"), the result is always 0.

I used the evalute forumula and here is what it says :

Datedif(39236,39266, "d"). How can the result be 0. Cell1 and Cell2 are
calculated fields with a format of custom (mmm dd yyyyy). I have tried
changing the format to date but still the same effect.

The calculations in the cell1 and cell2 are Date(Year(cell5),
Month(cell5)+1, Day(cell6).

Help - this is driving me crazy.

  #3   Report Post  
Posted to microsoft.public.excel.misc
Rob Rob is offline
external usenet poster
 
Posts: 718
Default DateDif Question

No Dice.

Here is the formula for the cell2, cell3

Cell2 = 03/15/07
cell3 =

=IF(A18=" "," ",IF('Loan Summary'!$B$7,DATE(YEAR('Amortization
Schedule'!B17),MONTH('Amortization Schedule'!B17),DAY('Amortization
Schedule'!B17)+14),DATE(YEAR('Amortization Schedule'!B17),MONTH('Amortization
Schedule'!B17)+1,DAY('Amortization Schedule'!B17))))

"Max" wrote:

Try it with a little coercion:
=DATEDIF(A1+0,B1+0, "d")
assuming source dates in A1, B1 (earlier/later dates)
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"Rob" wrote:
I using DATE(Cell1,Cell2,"d"), the result is always 0.

I used the evalute forumula and here is what it says :

Datedif(39236,39266, "d"). How can the result be 0. Cell1 and Cell2 are
calculated fields with a format of custom (mmm dd yyyyy). I have tried
changing the format to date but still the same effect.

The calculations in the cell1 and cell2 are Date(Year(cell5),
Month(cell5)+1, Day(cell6).

Help - this is driving me crazy.

  #4   Report Post  
Posted to microsoft.public.excel.misc
Max Max is offline
external usenet poster
 
Posts: 9,221
Default DateDif Question

Cell2 = 03/15/07

The above is not a valid date.
Fix it* to be a valid date and the DATEDIF expression should work fine.
*eg re-enter cell 2 as a full unambiguous date: 15 Mar 2007
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"Rob" wrote:
No Dice.

Here is the formula for the cell2, cell3

Cell2 = 03/15/07
cell3 =

=IF(A18=" "," ",IF('Loan Summary'!$B$7,DATE(YEAR('Amortization
Schedule'!B17),MONTH('Amortization Schedule'!B17),DAY('Amortization
Schedule'!B17)+14),DATE(YEAR('Amortization Schedule'!B17),MONTH('Amortization
Schedule'!B17)+1,DAY('Amortization Schedule'!B17))))


  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 31
Default DateDif Question

Hello Rob
Not sure but try:
=DATEDIF(DATEVALUE(Cell1),DATEVALUE(Cell2),"d")

HTH
Cordially
Pascal

"Rob" a écrit dans le message de news:
...
No Dice.

Here is the formula for the cell2, cell3

Cell2 = 03/15/07
cell3 =

=IF(A18=" "," ",IF('Loan Summary'!$B$7,DATE(YEAR('Amortization
Schedule'!B17),MONTH('Amortization Schedule'!B17),DAY('Amortization
Schedule'!B17)+14),DATE(YEAR('Amortization
Schedule'!B17),MONTH('Amortization
Schedule'!B17)+1,DAY('Amortization Schedule'!B17))))

"Max" wrote:

Try it with a little coercion:
=DATEDIF(A1+0,B1+0, "d")
assuming source dates in A1, B1 (earlier/later dates)
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"Rob" wrote:
I using DATE(Cell1,Cell2,"d"), the result is always 0.

I used the evalute forumula and here is what it says :

Datedif(39236,39266, "d"). How can the result be 0. Cell1 and Cell2
are
calculated fields with a format of custom (mmm dd yyyyy). I have tried
changing the format to date but still the same effect.

The calculations in the cell1 and cell2 are Date(Year(cell5),
Month(cell5)+1, Day(cell6).

Help - this is driving me crazy.





  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,268
Default DateDif Question

Why are you using DATEDIF this way, you will get the same result simply by
using

=cell3-cell2


and format as general


of course the reason you get zero is what others already have said, you are
using text


--


Regards,


Peo Sjoblom


"Rob" wrote in message
...
I using DATE(Cell1,Cell2,"d"), the result is always 0.

I used the evalute forumula and here is what it says :

Datedif(39236,39266, "d"). How can the result be 0. Cell1 and Cell2 are
calculated fields with a format of custom (mmm dd yyyyy). I have tried
changing the format to date but still the same effect.

The calculations in the cell1 and cell2 are Date(Year(cell5),
Month(cell5)+1, Day(cell6).

Help - this is driving me crazy.



  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5,651
Default DateDif Question

On Wed, 17 Oct 2007 20:55:05 -0700, Rob wrote:

I using DATE(Cell1,Cell2,"d"), the result is always 0.

I used the evalute forumula and here is what it says :

Datedif(39236,39266, "d"). How can the result be 0. Cell1 and Cell2 are
calculated fields with a format of custom (mmm dd yyyyy). I have tried
changing the format to date but still the same effect.

The calculations in the cell1 and cell2 are Date(Year(cell5),
Month(cell5)+1, Day(cell6).

Help - this is driving me crazy.


I assume you have a typo above since DATE(Cell1,Cell2,"d") is not valid.

Suggestions:
1. Format the cell with the datedif formula as "General".
2. If you just want "days" difference, then use
=C2-C1 (and format the result as number or general)
--ron
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
DATEDIF Deborah Excel Worksheet Functions 11 September 12th 07 04:06 PM
DateDif ? nhvwchic Excel Worksheet Functions 3 August 24th 06 08:40 PM
=DATEDIF Excel User001 Excel Worksheet Functions 2 February 3rd 06 04:20 PM
DateDif Average? Damn DateDif UTCHELP Excel Worksheet Functions 14 November 17th 05 10:30 AM
=DATEDIF(B14,B4,"m") teeb Excel Discussion (Misc queries) 1 July 20th 05 11:52 PM


All times are GMT +1. The time now is 05:40 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"