I need to figure out how to convert Lat. & Long. entries on an Excel spreadsheet to just the numeric value.
So for example we have 46° 43' N and 139º 56'E. I need this to be read as 46.43 and 139.56, respectively. How can I do that?
Thanks!
If your degree sign ° will always be the same, you could use:
=SUBSTITUTE(LEFT(SUBSTITUTE(A1,CHAR(176),"."),FIND("'",A1)-1)," ","")
to produce a text string or
=--SUBSTITUTE(LEFT(SUBSTITUTE(A1,CHAR(176),"."),FIND("'",A1)-1)," ","")
to produce a number.
If your degree sign is sometimes ° and sometimes º (they look the same here but the second, in many fonts, has an underscore under the °, as is shown in your longitude example, then:
=SUBSTITUTE(LEFT(SUBSTITUTE(SUBSTITUTE(A1,CHAR(176),"."),CHAR(186),"."),FIND("'",A1)-1)," ","")
or
=--SUBSTITUTE(LEFT(SUBSTITUTE(SUBSTITUTE(A1,CHAR(176),"."),CHAR(186),"."),FIND("'",A1)-1)," ","")