Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 04-23-2012, 03:13 AM
Catalin.B Catalin.B is offline Windows Vista Office 2010 32bit
Expert
 
Join Date: May 2011
Location: Iaşi, România
Posts: 386
Catalin.B is on a distinguished road
Default

Quote:
Originally Posted by Jamal NUMAN View Post
How do I use it to convert the decimal angles to DMS? Could you please elaborate more?
I think that the second part of my issue is still not solved. What if I need to insert the 35º12’14’’ directly to the cell? Do I need in this case to convert it first to decimal and then using the code to convert it to DMS?
Best
Jamal
Copy those functions in a VB module. Then, to convert to degree, in cell A3 of your worksheet use the formula: =Convert_Degree(A1) to convert a decimal value from cell A1 to angular value, displayed as DMS. This is now, a text string in A3, not a value! So if you need to 2 cells that looks like 15°19'55,2" you have to convert these text strings back to a decimal value, add them, then convert them to a sexagesimal value, to be displayed in DMS. Assuming that you have 19°22'37,2" in A1 and 15°19'55,2" in A2, the formula to sum A1+A2 in A3 should look like:
=Convert_Degree(Convert_Decimal(A1)+Convert_Decima l(A2))
You can enter a value in DMS as a text string, which will be transformed in calculations in decimal.
If in A1 is a decimal value, and in A2 a value inserted by you, like 35º12’14’’, then use in A3 the functions like this(convert A2 to decimal, add it to A1, then convert the result to be displayed as DMS):
=Convert_Degree(A1+Convert_Decimal(A2))
But, you have another option from Paul, which is a great answer, i am ashamed that i did not realised that sexagesimal circle matches perfectly the time circle and DMS can be displayed by formatting the decimal value to a custom time format [hh]ºmm'ss.00''. With this format, the results can be simply added and the cell formatted to display DMS
As Paul sugested, use (A1+A2)/24 in a custom formatted cell and you will have the same answer as the UDF. The problem with this approach is that you cannot enter a value in DMS, values can only be entered in decimal system. And another minus is that this can be applied only to sexagesimal system, will not work on centesimal system (at least i think so... )To work on centesimal system , the functions are easy to modify, replacing 60 with 100 and 3600 with 10000.
Reply With Quote
  #2  
Old 04-23-2012, 04:40 AM
macropod's Avatar
macropod macropod is offline Windows 7 64bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,467
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Quote:
Originally Posted by Catalin.B View Post
As Paul sugested, use (A1+A2)/24 in a custom formatted cell and you will have the same answer as the UDF. The problem with this approach is that you cannot enter a value in DMS, values can only be entered in decimal system.
Actually, you can - simply input the DMS in HH:MM:SS format into a cell formatted with my custom number format. For example, for an angle of 10º15'22'', input 10:15:22. To get the decimal equivalent of that in another cell, simply multiply it by 24.

BTW: Who uses centesimal angular measures?
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #3  
Old 04-23-2012, 04:45 AM
Catalin.B Catalin.B is offline Windows Vista Office 2010 32bit
Expert
 
Join Date: May 2011
Location: Iaşi, România
Posts: 386
Catalin.B is on a distinguished road
Default

Quote:
Actually, you can - simply input the DMS in HH:MM:SS format into a cell formatted with my custom number format. For example, for an angle of 10º15'22'', input 10:15:22. To get the decimal equivalent of that in another cell, simply multiply it by 24.
And again i bite the dust... :d
Reply With Quote
  #4  
Old 04-23-2012, 01:45 PM
Jamal NUMAN Jamal NUMAN is offline Windows 7 64bit Office 2010 64bit
Expert
 
Join Date: Nov 2010
Posts: 615
Jamal NUMAN is on a distinguished road
Question

Quote:
Originally Posted by macropod View Post
Actually, you can - simply input the DMS in HH:MM:SS format into a cell formatted with my custom number format. For example, for an angle of 10º15'22'', input 10:15:22. To get the decimal equivalent of that in another cell, simply multiply it by 24.

BTW: Who uses centesimal angular measures?
Thank you guys for the help. This is very useful.
I’m wondering why the Excel doesn’t have such data format as built in feature.
We use complicated computations in the engineering surveying that includes angles as a main data. All the computations are based on the angles in DMS.
For example, as we collect angle data from the fields, the sum of the measured angles for any polygon should equal (n-2)*180. If the sum is different from this value, then the error is calculated and then distributed in all the measured angles. This is why a lot of angle computation is involved (screenshot).
I couldn’t find the ##º##’##.##’’ on the custom (the screenshot is attached) so that I can make the 10:15:22 appears as 10º15’22’’
How can i enter all the angle values (shown in screenshot one) so that they appear in DMS format and can be processed applying particular calculations.
Best
Jamal
Attached Images
File Type: jpg Clip_865.jpg (67.9 KB, 62 views)
File Type: jpg Clip_864.jpg (81.3 KB, 61 views)
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Date Calculation Lights Excel 5 04-18-2012 04:31 AM
calculation of start date ketanco Project 1 02-29-2012 07:01 AM
Formula calculation danbl Excel 8 02-23-2012 04:35 AM
Calculation within Cells manich1 Excel 2 12-07-2011 02:59 PM
Angle Bracket Problem, STYLEREF in Header of a Protected Document wordjunkie Word 0 06-18-2010 04:34 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 10:59 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft