Forum Discussion
ReliableBoy2
Apr 07, 2023Copper Contributor
Using TimeValue function to display hours and minutes spent.
Hi, I am stuck with the following issue, https://docs.google.com/spreadsheets/d/1TK1YrYzYgD-Sqgf4PmycPKbZ-iJH7ppD/edit?usp=share_link&ouid=101514595417469444876&rtpof=true&sd=true The abo...
SAM_XL
Apr 08, 2023Copper Contributor
I have modified the formula you had, to get the desired results. pls check:
PASTE IN Q8
=IF(OR(O8="",P8=""),"",IF(INT((TIMEVALUE(TEXT(P8,"hh:mm AM/PM"))-TIMEVALUE(TEXT(O8,"hh:mm AM/PM")))*24)=0,"",INT((TIMEVALUE(TEXT(P8,"hh:mm AM/PM"))-TIMEVALUE(TEXT(O8,"hh:mm AM/PM")))*24)))
PASTE IN R10
=IF(OR(O8="",P8=""),"",IF(INT((TIMEVALUE(TEXT(P8,"hh:mm AM/PM"))-TIMEVALUE(TEXT(O8,"hh:mm AM/PM")))*24*60)=0,"",IF(INT((TIMEVALUE(TEXT(P8,"hh:mm AM/PM"))-TIMEVALUE(TEXT(O8,"hh:mm AM/PM")))*(24*60)-(Q8*60))<0,"",INT((TIMEVALUE(TEXT(P8,"hh:mm AM/PM"))-TIMEVALUE(TEXT(O8,"hh:mm AM/PM")))*(24*60)-(Q8*60)))))