Spread sheet formula for DMS and DD

froggy1

New Member
Joined
Jul 5, 2012
Messages
3
Hello,

This is my first time.
first of all, I am looking for a spread sheet formula to convert
for example 53°32'53" (this is how it is on the spread sheet already, I believe in text format), to decimal degrees.

Secondly I would like a spread sheet formula to convert for example 53.5517 decimal degrees to 53°33'06"

Thank you
 

Excel Facts

Copy a format multiple times
Select a formatted range. Double-click the Format Painter (left side of Home tab). You can paste formatting multiple times. Esc to stop
function deg_to_dms ( degfloat )
Input must be non-negative: if degfloat < 0 error end if Compute degrees, minutes and seconds: deg ← integerpart ( degfloat ) minfloat ← 60 * ( degfloat - deg ) min ← integerpart ( minfloat ) secfloat ← 60 * ( minfloat - min ) Round seconds to desired accuracy: secfloat ← round( secfloat, digits ) After rounding, the seconds might become 60. These two if-tests are not necessary if no rounding is done. if secfloat = 60 min ← min + 1 secfloat ← 0 end if if min = 60 deg ← deg + 1 min ← 0 end if Return output: return ( deg, min, secfloatthis could be mend function

</pre>
ref
this function can be referred to within a cell
 
Upvote 0
I have found this formula, that works great, to convert deg min sec to decimal degrees when the number format is
53 32' 53"

=SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(TRIM(A3)," ",":"),"'",""),CHAR(34),"")*24

what I am looking for is how should this formula be written to take into consideration the ° sign?
as in converting 53° 32' 53" to decimal degrees. Can it be done?
Any help would be appreciated!
 
Upvote 0

Forum statistics

Threads
1,214,833
Messages
6,121,864
Members
449,052
Latest member
Fuddy_Duddy

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top