Converting DM to DD

campingjunkie

New Member
Joined
May 1, 2019
Messages
4
I have been beating away at this keybod for hours and i am stuck trying to convert my gps coordinates to another format. Can someone help with this?

here is what I am trying to do:


Cell A Cell B

N 34 37.760,W 84 11.565 -----> 34.629333, -84.19275


or


Cell A Cell B Cell C
N 34 37.760 W 84 11.565 34.629333, -84.19275


Any Help would be appreciated. Thank you.
 

Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)
Thank you,
I under stand that part, i gues i left out that I"m looking for a formula that would convert. I have been hacking on this:

=MID(A66, FIND(" ", A66, FIND(" ", A66)+1)+1,256)/60

but this only get me from

N 40 32.034 to 0.5339 Now how do i get the 40 part back in to the formula? with a left?

i figured out how to go from 40 32.034 to 40.5339 with out the N. as soon and I add the N, i get lost. Im using:

=LEFT(A63,FIND(" ",A63)-1)+RIGHT(A63,LEN(A63)-FIND(" ",A63)+0)/60

to get: 40 32.034 to 40.5339.
 
Upvote 0
A few questions:
How many records are you converting? (dozens, hundreds, thousands...)

Is the data all entered by hand or generated?

Are you preferring a worksheet formula or are you comfortable with scripting?
 
Upvote 0
converting close to about 5 thousand locations.

it was all put in by hand.

I prefer a worksheet formula, i have no clue on scripting,

I have been able to figure out all the other styles of conversions in formulas, this will be the last variation that i need. i can get the strings i need one at a time, but when i goto combine two strings it gets all messy. I cant figure out how put the stings in the correct order with a + or a & or put the () in the right spot.

if it help the N and W are in all the cells.
 
Upvote 0
This would work if your Latitude and Longitude values are in separate columns:
Excel 2010
ABCD
LatLonDEC LatDEC Lon
N 34 37.760W 84 11.565

<colgroup><col style="width: 25pxpx"><col><col><col><col></colgroup><thead>
</thead><tbody>
[TD="align: center"]1[/TD]

[TD="align: center"]2[/TD]

[TD="align: right"]34.62933333[/TD]
[TD="align: right"]-84.1928[/TD]

</tbody>
Sheet3

[TABLE="width: 85%"]
<tbody>[TR]
[TD]Worksheet Formulas[TABLE="width: 100%"]
<thead>[TR="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DAE7F5]#DAE7F5[/URL] "]
[TH="width: 10px"]Cell[/TH]
[TH="align: left"]Formula[/TH]
[/TR]
</thead><tbody>[TR]
[TH="width: 10px, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DAE7F5]#DAE7F5[/URL] "]C2[/TH]
[TD="align: left"]=IF(OR(LEFT(A2,1)="W",LEFT(A2,1)="S"),-1,1)*(MID(A2,(FIND(" ",A2,1)+1),FIND(" ",A2,(FIND(" ",A2,1)+1))-(FIND(" ",A2,1)+1))+RIGHT(A2,LEN(A2)-FIND(" ",A2,(FIND(" ",A2,1)+1)))/60)[/TD]
[/TR]
[TR]
[TH="width: 10px, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DAE7F5]#DAE7F5[/URL] "]D2[/TH]
[TD="align: left"]=IF(OR(LEFT(B2,1)="W",LEFT(B2,1)="S"),-1,1)*(MID(B2,(FIND(" ",B2,1)+1),FIND(" ",B2,(FIND(" ",B2,1)+1))-(FIND(" ",B2,1)+1))+RIGHT(B2,LEN(B2)-FIND(" ",B2,(FIND(" ",B2,1)+1)))/60)[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
</tbody>[/TABLE]
 
Upvote 0
Thanks, They work perfectly. I was close. just not close enough or how long it would have taken me to get there.

this is how far i got:

[TABLE="width: 1194"]
<colgroup><col><col><col span="2"><col><col><col></colgroup><tbody>[TR]
[TD="colspan: 7"]=LEFT(A63,FIND(" ",A63)-1)+RIGHT(A63,LEN(A63)-FIND(" ",A63)+0)/60[/TD]
[/TR]
[TR]
[TD="colspan: 7"]=LEFT(A69,FIND(" ",A69)-1)+RIGHT(A69,LEN(A69)-FIND(" ",A69)+0)/60[/TD]
[/TR]
[TR]
[TD="colspan: 7"]=ROUND(( LEFT($A69,FIND(" ",A69)-1)+RIGHT($A69,LEN($A69)-FIND(" ",$A69)+0)/60 ),6)[/TD]
[/TR]
[TR]
[TD="colspan: 7"]=MID(A69,FIND(" ",A69)+1,256)&LEFT(A69,FIND(" ",A69)-2)[/TD]
[/TR]
[TR]
[TD="colspan: 7"]Thank you for the help, now my brain wont hurt. Splitting them up was the easy part.l[/TD]
[/TR]
</tbody>[/TABLE]
 
Upvote 0
Late to the party, but here is a shorter formula to try:

=1440*REPLACE(SUBSTITUTE(TRIM(A2)," ",":"),1,1,0)*IF(OR(LEFT(TRIM(A2))={"S","W"}),-1,1)
 
Upvote 0
Even later to the party, but with what is probably the shortest formula...

=1440*SUBSTITUTE(MID(A2,3,99)," ",":")
 
Last edited:
Upvote 0

Forum statistics

Threads
1,223,577
Messages
6,173,164
Members
452,504
Latest member
frankkeith2233

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