Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default convert to decimal degree from DMS

Hello,

I have data in DMS (degree minute second) format and I need to convert
to decimal degrees. I would love to use a script that i saw published
on these pages (and which i can no longer find)- but i have never used
macros before... and i got a bit tripped up last time. Does anyone
have the time to post their (accurate) script for this conversion &
instructions for step by step implementation? Much Abliged-

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 227
Default convert to decimal degree from DMS

If your degrees, minutes and seconds are in separate columns, you can
do this:

Assume 121 degrees, 8 minutes, 6 seconds, in A1, B1, C1, respectively.

in D1 enter this formula:

=A1+((B1*60)+C1)/3600

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default convert to decimal degree from DMS

thanks! unfortunately the coordinates are dms in one single column.

anyone else have a suggestion?

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 227
Default convert to decimal degree from DMS

Please give me examples of your data. I'll need to know if the format
of the data is consistent from cell to cell.

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default convert to decimal degree from DMS

are you using Time notation to store the value

60:20:10 for example.

if so, you just multiply the cell by 24. Assume A1 holds the DD:MM:SS, then
B1 = A1*24

http://www.cpearson.com/excel/latlong.htm
See Chip Pearson's pag eon this.

--
Regards,
Tom Ogilvy


"student" wrote in message
ups.com...
thanks! unfortunately the coordinates are dms in one single column.

anyone else have a suggestion?





  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default convert to decimal degree from DMS

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.

  #7   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
Reply
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 02:05 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"