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:

LatitudeLongitude
37° 34' 45.90"-87° 39' 34.60"

<tbody>
</tbody>

<tbody>
</tbody>
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

What is =ROMAN(40) in Excel?
The Roman numeral for 40 is XL. Bill "MrExcel" Jelen's 40th book was called MrExcel XL.
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,214,918
Messages
6,122,257
Members
449,075
Latest member
staticfluids

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