Re: Finding Time difference



One way:

A1: <start time>
B1: <end time>

C1: =B1-A1

format C1 as time.

XL stores times as fractional days (e.g., 3:00 = 0.125), so if your
times span midnight, the "later" time will be smaller than the "earlier"
time. Compensate that by adding 1 to the "end time". You can take
advantage of XL's automatic coercion of boolean TRUE/FALSE values to 1/0:

=(B1<A1) + B1 - A1

or the more obscure, but equivalent:

=MOD(B1-A1, 1)

In article <#RvlpC$VFHA.3152@xxxxxxxxxxxxxxxxxxxx>,
"John Harris" <harris@xxxxxxxx> wrote:

> I know this has to be easy. I have a start time and an end time. I need the
> difference in hours and minutes. I used the examples in the help, but it
> converts it to text and then it won't add. Anyone?
.



Relevant Pages

  • Re: Conditional Format Using AND
    ... but I only want the color change to happen if "PREV" is in column A, ... > your second format condition will always be true and red format ... > Pearson Software Consulting, LLC ...
    (microsoft.public.excel.misc)
  • Re: [RFC PATCH 16/22 -v2] add get_monotonic_cycles
    ... and I just blew away all my marker code for something like this;-) ... const char *format, ...) ... struct task_struct *prev; ...
    (Linux-Kernel)
  • Cannot copy. files on this CD are read only
    ... and now read only .Microsoft will not help,they pass me onto a tech line at ... My only solution might be to format and start over ... ..this is really pissing me off .Any ideas here ...Thanks ... Prev by Date: ...
    (microsoft.public.windowsxp.general)
  • Re: stop script if dates are missing, edit help...
    ... he wanted the ability to enter the start date in 1/1/2005 format and ... right on column J, which is K, if any of those are missing to print out ... msg box and basically stop and say: make sure the dates in the range ... Prev by Date: ...
    (microsoft.public.excel)
  • Re: Counting blanks fields for a report
    ... >>report that have a Null status field. ... >>denominator in an expression. ... You want to format the expression as a ... Prev by Date: ...
    (microsoft.public.access.reports)

Loading