I stole this from IML on June 25, 2001 11:43 AM tried to PM but I'm new so please don't harp on me too much please!
Assuming your number is A1, try the following
=INT(A1)&CHAR(186)&" "&INT((A1-INT(A1))*60)&CHAR(145)&" "&ROUND((((+A1-INT(A1))*60)-INT((+A1-INT(A1))*60)),2)*60&CHAR(145)
The calculation works fine, but rounds... I even tried adjusting &ROUND() but for some reason it isn't working
dd 34.616645 -112.4532 should come out to
DMS 34 36 59.9 N 112 27 11.5 W
The above formula rounds to 34 36 60 N 112 27 12
In my case, this is a 40 ft difference that I can not accept. I could write multiple cells that combine separate cells to get my equation by doing basic math, but just looking for a PRO solution from your community.
Assuming your number is A1, try the following
=INT(A1)&CHAR(186)&" "&INT((A1-INT(A1))*60)&CHAR(145)&" "&ROUND((((+A1-INT(A1))*60)-INT((+A1-INT(A1))*60)),2)*60&CHAR(145)
The calculation works fine, but rounds... I even tried adjusting &ROUND() but for some reason it isn't working
dd 34.616645 -112.4532 should come out to
DMS 34 36 59.9 N 112 27 11.5 W
The above formula rounds to 34 36 60 N 112 27 12
In my case, this is a 40 ft difference that I can not accept. I could write multiple cells that combine separate cells to get my equation by doing basic math, but just looking for a PRO solution from your community.