Re: TRUNC Function
From: Dani (anonymous_at_discussions.microsoft.com)
Date: 02/18/04
- Next message: Bob Phillips: "Re: Bottom total row?"
- Previous message: Mark Graesser: "RE: formula referencing text in other cell"
- In reply to: Peo Sjoblom: "Re: TRUNC Function"
- Next in thread: Mark Graesser: "Re: TRUNC Function"
- Reply: Mark Graesser: "Re: TRUNC Function"
- Reply: Gord Dibben: "Re: TRUNC Function"
- Reply: Bill: "Re: TRUNC Function"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 18 Feb 2004 11:07:02 -0800
Alright, the problem I have is that I have a series of
numbers as below:
115.18333
95.00000
129.81667
130.60000
110.49444
138.90556
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 0
95 0 0
129 49 0
130 36 0
110 29 40
138 54 20
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 negative
>
>--
>
>Regards,
>
>Peo Sjoblom
>
>
>"Dani" <anonymous@discussions.microsoft.com> wrote in
message
>news:125df01c3f64e$c5c91ec0$a001280a@phx.gbl...
>> I find that when I use the truncate function in Excel,
it
>> sometime rounds the data up, sometimes not. In the true
>> sense it should never round the number. I suspect it
has
>> something to do with the precision of the stored number.
>> I know I can reduce the precision of the stord data but
I
>> was wondering if there was anyway of increasing it?
>
>
>.
>
- Next message: Bob Phillips: "Re: Bottom total row?"
- Previous message: Mark Graesser: "RE: formula referencing text in other cell"
- In reply to: Peo Sjoblom: "Re: TRUNC Function"
- Next in thread: Mark Graesser: "Re: TRUNC Function"
- Reply: Mark Graesser: "Re: TRUNC Function"
- Reply: Gord Dibben: "Re: TRUNC Function"
- Reply: Bill: "Re: TRUNC Function"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|