View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.misc
Ron Rosenfeld Ron Rosenfeld is offline
external usenet poster
 
Posts: 5,651
Default When subtracting dates issue

On Thu, 6 Mar 2008 23:07:00 -0800, Adnan (donotspam)
wrote:

Thanks for your response Ron, how do I implement that?

Also, I’ve seen something close to what I need with Dadeif function but
cannot implement.


Tools/Options/Calculations
Workbook Options Select 1904 Date System

I see in another of your messages that you still see the #####
That is because Excel (helpfully?) formatted your result as a date, and it's
too wide for the cell. If you widen the cell, and reformat to your dd:hh:mm
that you want, that should take care of that problem.

Note that if you change to the 1904 Date, any previously entered dates will be
increased by four years + 1 day.

One other item -- I don't know how many days difference you are doing, but the
dd formatting will not display more than 31 days.

If you need to display more than 31 days, that will be the integer part of your
result and, if you format it as "number" or General, will display positive or
negative. You can then display the fractional part separately using the hh:mm
formatting. (Split these using the INT and MOD functions)

--ron