excel - Google spreadsheet - Formula does not show negative time -
i have google spreadsheet write down working time. example there following records
g9 | 05:05
h9 | 06:30
now want calculate if there time left or not. first try:
=if(g9>0;g9-h9;0)
second try:
=if(g9>0;if(g9<h9;g9-h9;h9-g9);0)
unfortunately both ends time 22:35
. because calculation below 0
let system think should start 24:00
.
how can display value -1:25
or vice-versa positive times (1:05
e.g.) dynamically formula?
i have tried change format of field, doesn't work since display times negative ones, when positive.
edit:
as information if has troubles work text values. @words mentioned have convert value. need function if want work arrays:
=sum(arrayformula(value(i2:i32)))
one can convert time string text
, , prepend "-" when needed:
=if(g9>=h9, text(g9-h9, "h:mm"), "-" & text(h9-g9, "h:mm"))
the result string, if it's needed in later computations 1 can still recover original value value
.
Comments
Post a Comment