If function with time
Closed
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.
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:
- Which function will you use to enter current time in a worksheet cell?
- How to enter @in laptop - Guide
- Popcorn time download - Download - Movies, series and TV
- How to change time in whatsapp - Guide
- Ocarina of time rom - Download - Action and adventure
- Facebook id verification time - Guide
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?
=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?