Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Need help with a formula to calculate time Hi, I am trying to find a formula to

ID: 639760 • Letter: N

Question

Need help with a formula to calculate time

Hi,

I am trying to find a formula to calculate the time difference between a start time and a stop time even if overnight AND to bring back a value of 1 if only the Start time column contains a time and a value of x if only the stop time contains a time AND a value of - if neither columns contain a time.

Column A12       Column B12         Column C12

Start time            Stop Time            #of hours/min passed

Start time                                         1

                            Stop time             x

blank                   blank                    -

Any help would be greatly appreciated !!!

Explanation / Answer

Hi..

try

C12: =IF(AND(A12="",B12=""),"",IF(A12="","x",IF(B12="","1",MOD(B12-A12,1))))

format the cell with this custom number format: [hh]:mm

then drag fill C12 down column C

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote