how make an angle to show in degree, minute,second instead of degree

E

EXCEL$B!!(BNEWS

hi,

i wonder how to change an angle to show in degree, minute,second instead of
degree in excel

i mean, for instance, make 45.5 (degree) to 45.3000 (d m s)

thanks
 
R

Rick Rothstein \(MVP - VB\)

Here is one way...

DecimalDegrees = 45.5
DegreesMinutesSeconds = Int(DecimalDegrees) & Format((DecimalDegrees - _
Int(DecimalDegrees)) / 24, "\.nnss")

Rick
 
E

EXCEL NEWS

Thanks a lot

Rick Rothstein (MVP - VB) said:
Here is one way...

DecimalDegrees = 45.5
DegreesMinutesSeconds = Int(DecimalDegrees) & Format((DecimalDegrees - _
Int(DecimalDegrees)) / 24, "\.nnss")

Rick
 
R

Rick Rothstein \(MVP - VB\)

You are welcome. As it turns out, we can simplify the expression somewhat..

DecimalDegrees = 45.5
DegreesMinutesSeconds = Int(DecimalDegrees) & _
Format(DecimalDegrees / 24, "\.nnss")

Rick
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top