Dani
..1833 times 60 equals 10.9998. No matter how many times you repeat the 3 it still comes up less than 11
Try the following three formula
=TRUNC(A1) degree
=TRUNC(MOD(A1,1)*60) minute
=TRUNC(MOD(MOD(A1,1)*60,1)*60) second
If you prefer you can round the seconds
=ROUND((MOD(MOD(A1,1)*60,1)*60),
But now you have a problem when the seconds round up to 60. You would then need to change the minute formula to
=IF(ROUND((MOD(MOD(A1,1)*60,1)*60),)=60,ROUND((MOD(A1,1)*60),),TRUNC(MOD(A1,1)*60)
and to get the seconds to return 0 instead of 60, change the seconds formula to
=IF(ROUND((MOD(MOD(A1,1)*60,1)*60),)=60,0,ROUND((MOD(MOD(A1,1)*60,1)*60),)
Hope this helps
Good Luck
Mark Graesse
(e-mail address removed)
----- Dani wrote: ----
Alright, the problem I have is that I have a series of
numbers as below
115.1833
95.0000
129.8166
130.6000
110.4944
138.9055
These are angles in decimal degrees. I want to transform
them into degrees minutes and seconds (i.e truncate the
value before the decimal as degrees, multiply the
remaining decimal by 60, truncate that as minutes and
multiply the remainder by 60 for seconds). It truncates
the first part fine but when I try to truncate the minutes
(after multiplication), the first one comes up as 10
instead of 11 (I know it should be 11) unless I increase
the precision of the truncate function. But if I do that
then the 5th one rounds to 30 instead of 29. I need it to
work consistently. This is the answers I should be
getting and do using a calculator
115 11
95 0
129 49
130 36
110 29 4
138 54 2
I have tested it using a calculator and I can see how it
would truncate to 10 (on the first one) if the number is
not held to its full precision in the calculator memory.
That is why I suspect it is a precision issue
-----Original Message----
Can you give an example
I only know that it rounds up when the value is negativ