If function with time

Closed
Luana - Feb 3, 2019 at 01:21 PM
 1man1diot - Feb 4, 2019 at 09:38 AM
Hello,

cell A = Time in,
Cell B = Time out

I need to round the duration in between as below

if sum(B1-A1)= 0:00:00 the answer should be 0:00:00
if sum(B1-A1)> 0:00:00<1:00:00 the answer should be 1:00:00
if sum(B1-A1)>= 1:00:00 the answer should be 1:30:00

Can anyone help me formulate this as the examples i found give the value "false" as an answer rather than showing the values i gave.
Related:

1 response

Are you qualifying the false value? If not, then it will display false, as it is not true. Syntax for if is:

=IF (test, true, false)

If your formula looks like this:
=If (test, b1)

Then it will display false, as you need to set what value to display if it is false, as in:
=If (test, b1, c1-b1)

In the above example, if the result of test is true, then the value of b1 will be displayed. If test is false, then the vakue of c1-b1 will be displayed.

Get it?
0