LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,651
Default convert to decimal degree from DMS

On 24 Jan 2006 13:47:42 -0800, "student" wrote:

thanks! an example of a north latitude coordinate (contained in one
cell) is:

32* 35' 19"

I need to find a dependable routine for converting this type of data to
decimal degrees.



Assuming your example is consistent, then:

=MID(A1,FIND("'",A1)+2,2)/3600+MID(A1,
FIND(" ",A1)+1,2)/60+LEFT(A1,FIND("*",A1)-1)

If your example is not consistent, we will need to see all the variations.

Consistent means:

1. The "degrees" is terminated by an asterisk
2. The "minutes" follows the first <space and is terminated by a single
quote, and always contains two digits (e.g. 07' and not 7')
3. The "seconds" follows the <quote<space and is always two digits.

If the format is not consistent, other solutions can easily be derived.


--ron
 
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
Convert decimal degree (lattitude/longitude) into Degree, Tim Ashcom Excel Discussion (Misc queries) 5 August 17th 05 04:53 PM
Convert degree from decimal number to the standard format (degre. Zainelabdin Excel Discussion (Misc queries) 3 March 27th 05 12:37 PM
decimal to degree min sec Zainelabdin Excel Discussion (Misc queries) 1 March 26th 05 12:41 AM


All times are GMT +1. The time now is 06:01 AM.

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"