LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #2   Report Post  
Posted to microsoft.public.excel.misc,microsoft.public.excel.programming
external usenet poster
 
Posts: 3,268
Default Simple way to convert UTM ED50 coordinates to decimal coordinates?

This worked for me using your example, assume the values are in column K,
insert
8 empty columns to the right of K, that is select columns L to S and do
insertcolumns
Select column K and do datatext to columnsfixed width, make sure all you
values are there,
click next and finish, now select column K and column O and do editreplace,
place the cursor in the
find what box and hold down alt while typing 0176 on the numpad, release
Alt, leave replace with empty and select replace all
now select columns L and P, do the same but put an apostrophe in the find
what box, repeat once again for columns
M and Q but put a quotation mark in the find what box. That would give you
numbers in each column except for the N and the E i columns N and R

Now in a cell get the Latitude as follows

=K2+L2/60+M2/3600

copy down

for Longitude

=O2+P2/60+Q2/3600

--
Regards,

Peo Sjoblom

(No private emails please, for everyone's
benefit keep the discussion in the newsgroup/forum)



"Dan" wrote in message
...
Hi there,

I do have a string in a cell that looks like this (this is UTM ED50

format):

46° 34' 21.09" N 8° 24' 54.28" E


I need to convert this string to Latitude and Longitude. The calculation
method is pretty simple. In the example above, its
46 + 34/60 + 21.09/3600 = 46.572525 (Lattitude)
8 + 24/60 + 54.28/3600 = 8.415077778 (Longitude)

So, the calculation as such is not very complicated.
What drives me nuts is to get the numbers out of the long ED50 string. I
managed this with a LOT of SEARCH() and MID() functions, but it's just
awfull !!.

Latitude

=MID($K2,1,SEARCH("°",$K2)-1)+(MID($K2,SEARCH("°",$K2)+1,(SEARCH("'",$K2)-SE

ARCH("°",$K2))-1))/60+(MID($K2,SEARCH("'",$K2)+1,(SEARCH("""",$K2)-SEARCH("'
",$K2))-1)/3600)
Longitude

=MID(MID($K2,22,15),1,SEARCH("°",MID($K2,22,15),1)-1)+MID(MID($K2,22,15),SEA

RCH("°",MID($K2,22,15),1)+1,SEARCH("'",MID($K2,22, 15),1)-SEARCH("°",MID($K2,

22,15),1)-1)/60+MID(MID($K2,22,15),SEARCH("'",MID($K2,22,15),1) +1,SEARCH("""
",MID($K2,22,15),1)-SEARCH("'",MID($K2,22,15),1)-1)/3600

Anyone knows a simpler way?

Thanks

Dan





 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Coordinates 5F80YZ Excel Worksheet Functions 3 September 9th 09 12:47 AM
Converting Lat/Lon coordinates to Decimal Cheese Excel Discussion (Misc queries) 4 June 25th 09 11:12 PM
How do I convert Easting/ Northing GPS coordinates into Lat/Long? Stacey Excel Discussion (Misc queries) 1 June 12th 07 03:58 AM
convert x/y coordinates to a shape file to use in Cad? LLM Excel Discussion (Misc queries) 1 February 9th 07 01:40 AM
Converting MouseDown Coordinates to Chart Point Coordinates Steve[_50_] Excel Programming 3 December 2nd 03 06:48 PM


All times are GMT +1. The time now is 06:04 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"