# Desktop

## General discussion

Locked

### How to convert 30.75 in 30?34'30

By ·
To resolve problems in trigonometry.
Until now I resolve Cos, Sin, Tan, Air Cos, Air Sin and Air Tan but to converted results from 48.270/5.33=9.056285178 I don't find out how to convert this on 9?3'22.6266" How I have to do to get it?

This conversation is currently closed to new comments.

15 total posts (Page 1 of 2)   01 | 02   Next
| Thread display: Collapse - | Expand +

Collapse -

### Converting Decimal Degrees to DMS

by In reply to How to convert 30.75 in 3 ...

This looks like your converting decimal degrees into DMS (degrees, minutes, seconds) and it a very straight forward process.

To convert 9.056285178 decimal degrees into DMS first subtract the 9, then mulitple the result .056285178 by 60 to get your minutes, 3.37711068. Once you have the minutes subtract that value (the 3) and multiple by 60 again to get your seconds .37711068 * 60 = 22.6266.

You now have the three pieces you need for your DMS value, the 9, the 3 and 22.6266 putting them in order 9?3'22.6266".

If you need to proof it then reverse process and divide by 60 for the 2 steps. It will be off a little bit due to rounding.

Collapse -

### Converting Decimal Degrees to DMS

by In reply to Converting Decimal Degree ...

Thanks Ice Man
Your answer is logic; but when A1 is #.decimals I want to find a magic formul in A2 that give me as an answer DD?mm'ss.ss" in one cel; without so many calculs to do in diferents cels.
For sample in Sin of A1(30) I find "=sin(radians(a1))" and I get .5; that is what I looking for.
Thanks

Collapse -

### Translation problem ?

by In reply to Converting Decimal Degree ...

0.5 is the sine it's not an angle, expressing it in DMS is meaningless.

If you calculate a sine from the lengths the triangle and then take it's inverse (arcsin) then you get the angle that would subtend a triangle with those two lenghts.

If you want to display a decimal number as DMS.s and put it in one cell as a label in that format, it's doable but longwinded. Personally I'd work out the intermediates in other columns and do the string conversion last, then hide the working out columns.
Or you could write functions to work out the intermediates and then chain them together.
B1 = DegreesOf(A1) + '?' + MinutesOf(A1) + '.' ... etc.
Doing it all in one cell is possible but I wouldn't recommend it, you'll spend twenty days looking for missing parentheses ,and when you are done it will be unbelievably inefficient.

Collapse -

### Converting Decimal into and from DDMMSS

by In reply to Translation problem ?

There is a link that provide me all the information I need to have it done automatically without having to create a custom formatting. The site gives me the information for converting from decimail to DMS and from DMS to decimal.
http://support.microsoft.com/?kbid=213449
Thanks Tony I hope this helps you too in your programing career.

Collapse -

### Unlikely - but thanks for the thought

by In reply to Converting Decimal into a ...

Twenty years and counting...

Collapse -

### ...sure, you've spent 20 years and counting, but...

by In reply to Unlikely - but thanks for ...

...have you spent 20 years converting from DMS to decimal degrees and back? :)

But seriously, sometimes in a bid to shorten code as much as possible we introduce unneeded complexity. I agree with you (and from the evidence pf that KB article, so do MSFT) that doing each step on a line of its own makes the coding less error-prone, especially in this case.

Collapse -

### Well I started looking at it

by In reply to ...sure, you've spent 20 ...

before google was invented, so it took a while.
LOL

Hunt the parentheses is a great game isn't it. Especially when there's three missing, and operator precedence comes in to play.

Collapse -

### Converting Decimal Degrees to DMS

by In reply to Converting Decimal Degree ...

I create in Format-cell-Custom "dd?00'ss.0"; Excel 2003 of course but this is giving me for
1.5 1?0:0.0 1.55 1?12:0.0
1.6 1?24:0.0 1.66 1?50:24.0
1.74 1?45:36.0 1.75 1?0:0.0
15.25 15?0:0.0 15.5 15?0:0.0
15.75 15?0:0.0 15.99 15?45:36.0
119.99 28?45:36.0 59.99 28?45:36.0
I get crazy trying to find out why.

Collapse -

### Converting Decimal Degrees to DMS

by In reply to Converting Decimal Degree ...

I believe this link will provide you the information you need to have it done automatically without having to create a custom formatting. The site gives the information for converting from decimail to DMS and from DMS to decimal. Just make sure your back on one of your worksheets when entering the data.

http://support.microsoft.com/?kbid=213449

Collapse -

### Converting Decimal Degrees to DMS

by In reply to Converting Decimal Degree ...

Good, very good, This is wonderful.
This save me a lot of time and hearikkkkk.
A little macro and that's it.
Thank you very much to you.
Ice Man U the best, keeping like that.
Thanks again

15 total posts (Page 1 of 2)   01 | 02   Next

## Related Discussions

• 0

ShaneK //

• 3

rhodyste2 //

• 0

vito855 //

• 0

hier2000 //

• 0

#### Is Freesync Gaming Monitor Technology works with nVidia

michaeljohnson4595 //