This article was previously published under Q73023
This article has been archived. It is offered "as is" and will no longer be updated.
This article provides a sample Microsoft Excel macro type (XLM) to converta degree value stored in decimal format (base 10) to degrees, minutes, andseconds as text. Microsoft Excel does not provide a number format to dothis.
Fractions of a degree are commonly expressed in units called minutes andseconds. One degree is equivalent to 60 minutes, and similarly one minuteequals 60 seconds. These units are most commonly used with nautical chartsand navigation.
Microsoft provides programming examples for illustration only, without warranty either expressed or implied. This includes, but is not limited to, the implied warranties of merchantability or fitness for a particular purpose. This article assumes that you are familiar with the programming language that is being demonstrated and with the tools that are used to create and to debug procedures. Microsoft support engineers can help explain the functionality of a particular procedure, but they will not modify these examples to provide added functionality or construct procedures to meet your specific requirements. The following function macro will accept an angle formatted as a decimalnumber and convert it to degrees, minutes, and seconds as text.
Microsoft Excel 95 Standard Edition, Microsoft Excel 5.0c, Microsoft Excel 4.0a, Microsoft Excel 5.0 Standard Edition, Microsoft Excel 5.0a for Macintosh, Microsoft Excel 4.0 for Macintosh, Microsoft Excel 3.0a for Macintosh