Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

convert number into degrees minutes seconds (DMS) in Excel

Status
Not open for further replies.

ScubaStevo

Programmer
May 4, 2002
132
AU
Hi

How can i convert a decimal number into degrees minutes seconds in Excel?

Thanks

Steve
 
create a user defined function, place it on a module, and then use it as anyother Excel function.

If you need more help please give uas a matematical formulae required for the conversion you need, and we will try and help you with the problems you have converting that to VB code (but do show us your attempted code please).

Regards

Frederico Fonseca
SysSoft Integrated Ltd
 
Is the original decimal number the degrees in decimal?

Cheers, Glenn.

Did you hear about the literalist show-jumper? He broke his nose jumping against the clock.
 


Are you converting radians to degrees?

or

are you simply converting degrees remainder to minutes & seconds

Skip,

[glasses] [red]A palindrome gone wrong?[/red]
A man, a plan, a ROOT canal...
PULLEMALL![tongue]
 
Hi Steve,

Assuming you have a decimal number of degrees and you want to convert it to degrees, minutes and seconds, you can take advantage of the fact that minutes and seconds of degrees are similar to minutes and seconds of time.

If your number is in A1, then in B1 (or where you want) put:
[blue][tt]=TEXT(A1/24,"[h]° mm' ss''")[/tt][/blue]

Enjoy,
Tony

--------------------------------------------------------------------------------------------
We want to help you; help us to do it by reading this: Before you ask a question.
Excel VBA Training and more Help at VBAExpress[
 
Oh, the number is already in degrees (a decimal number like 38.15478 degrees) so I would like that to show 38 degrees, 9 minutes, 17.208 seconds but not with the words of course
 
Hi Steve,
the number is already in degrees

In that case, use Tony's solution or:
divide the angle by 24, then use a custom number format:
[h]° mm' ss''
where the ° following the [h] is created via Alt-0176. This has the possible advantage over Tony's solution of retaining the angle as a number.

Cheers
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top