79084508

Date: 2024-10-14 01:43:01
Score: 0.5
Natty:
Report link

CONVERT DD.DDD to DD:MM:SS (positive or negative) And DD:MM:SS to DD.DDD (positive or negative)

If my DD.ddddd value is in cell A7 then:

DD =INT(ABS(A7))*(SIGN(A7))

MM =(INT((((ABS(A7))-ABS(INT(ABS(A7)))))*60)*SIGN(A7))

SS =MROUND((((((ABS(A7))-ABS(INT(ABS(A7)))))*60)-ABS((INT((((ABS(A7))-ABS(INT(ABS(A7)))))*60))))*60,1)*SIGN(A7) (with MROUND giving an Integer SS value.)

Converting DD:MM:SS back to DD.DDDD (positive or negative) If my DD is in cell B7,and MM in cell C7,and SS in cell D7 then: DD.DDDD= =IF(OR(SIGN(VALUE(B7))=-1,SIGN(VALUE(C7))=-1,SIGN(VALUE(D7))=-1),(SUM(ABS(B7/1),ABS(C7/60),ABS(D7/3600))*-1),SUM(ABS(B7/1),ABS(C7/60),ABS(D7/3600)))

Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Unregistered user (0.5):
  • Low reputation (1):
Posted by: Jack Rice