Olsin,
It looks like the second part, "visa vera", of your question has gone unanswered.
But first, since I like minutes and seconds to show two digits, Yvan's formula has been modified to pad leading 0's in these positions and '' (double apostrophes, not single quote) have been added for for seconds. Besides, my solution depends on this feature. Yvan's formula has become:
=IF(ISBLANK(A2),"",IF(A<0,"-"&INT(ABS(A))&"°"&RIGHT("00"&INT(MOD(ABS(A),1)
60),2)&"'"&RIGHT("00"&ROUND(MOD(MOD(ABS(A),1)*60,1)60,0),2) &"''",INT(ABS(A))&"°"&RIGHT("00"&INT(MOD(ABS(A),1)
60),2)&"'"&RIGHT("00"&ROUND(MOD(MOD(ABS(A),1)*60,1)60,0),2)&"''"))
Reversing this process, i.e. going from ddºmm'ss'' (padded zeros for minutes and seconds
must be included) to decimal, the formula is:
=IF(ISBLANK(A2),"",IF(LEFT(A,1)="-",(ABS(VALUE(LEFT(A,SEARCH("º",A)-1)))+ VALUE(MID(A,SEARCH("º",A2)
1,2))/60+VALUE(MID(A,SEARCH("'",A)+1,2))/3600)*(-1),ABS(VALUE(LEFT(A,SEARCH("º", A)-1)+VALUE(MID(A2,SEARCH("º",A2)+1,2))/60+VALUE(MID(A,SEARCH("'",A)1,2))/3600))))
These formulas are somewhat lengthy, but I hope you find them satisfactory.
pw
Message was edited by: pw1840