Issues with Converting from DMS to DD

mpratt

New Member
Joined
Sep 5, 2014
Messages
16
I have a couple hundred Lat/Long coordinates to convert to decimal degree in this DMS format:

[TABLE="width: 500"]
<tbody>[TR]
[TD][TABLE="width: 500"]
<tbody>[TR]
[TD]Latitude[/TD]
[TD]Longitude[/TD]
[/TR]
[TR]
[TD]37° 34' 45.90"[/TD]
[TD]-87° 39' 34.60"[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
I've tried various VBA codes via help sites and a few equations but nothing I've tried has worked. I'm not the most adept at Excel, which may be part of the problem, but I simply don't know what else to do to convert these coordinates.

I'd appreciate any help at all.

Thanks!
-Maddy
 
After taking a break from this, I think I'm ready to try again. Hopefully this is the last issue I have with this formula. The issue I am having now is with this formula:

=LEFT(J12,LEN(J12)-6)+24*SIGN(J12)*RIGHT(TEXT(ABS(J12),"0\:00\:00.0"),7)

For some reason, it is reporting a #VALUE! error when given a Lat. or Long. with zeros after the decimal in this format:
37°35'14.00"

-or-

-87°44'56.00"

Could someone please help me figure out what is the issue with the formula?
Thanks!
 
Upvote 0

Excel Facts

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off
After taking a break from this, I think I'm ready to try again. Hopefully this is the last issue I have with this formula. The issue I am having now is with this formula:

=LEFT(J12,LEN(J12)-6)+24*SIGN(J12)*RIGHT(TEXT(ABS(J12),"0\:00\:00.0"),7)

For some reason, it is reporting a #VALUE! error when given a Lat. or Long. with zeros after the decimal in this format:
37°35'14.00"

-or-

-87°44'56.00"

Could someone please help me figure out what is the issue with the formula?
Thanks!

See if this modified version of the formula I posted earlier works for you...

=LEFT(ROUNDDOWN(J12,0),LEN(ROUNDDOWN(J12,0))-4)+24*SIGN(J12)*RIGHT(TEXT(TEXT(ABS(J12),"0.0"),"0\:00\:00.0"),7)
 
Upvote 0

Forum statistics

Threads
1,224,810
Messages
6,181,079
Members
453,021
Latest member
Justyna P

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