Time Calculations / If Statements

  • Thread starter Thread starter Anita Eschenko
  • Start date Start date
A

Anita Eschenko

I am needing to do a calculation on time results, however,
when my time difference involves results from times of
2400 and greater, my result is inaccurate. See below:
F1 G1
ATA ETA
2400 0015 (formula: f1-g1) answer is: 2385, but should
be 15. 2400 is midnight, 0015 is 12:15. I can't figure
out how to enter formula so I can calculate difference in
late arrivals when it's midnight. Would an "if"statement
fix this, if so, how do you do that? Or how do I fix this
problem? Your help would be GREATLY APPRECIATED! :)
 
If your values were really time (24:00:00), just formatted to look like 2400,
then Peo's formula worked fine for me.

But it sounds like your values are just integers.

If that's the case, this formula worked ok for me:

=MOD(TEXT(A1*100,"00\:00\:00")-TEXT(B1*100,"00\:00\:00"),1)

The text() stuff converts each to a time, then uses Peo's mod(subtraction)
formula.
 
Back
Top