Truncate

Matt Sherrill mmsv45 at yahoo.com
Wed Dec 11 11:48:58 PST 2013


Ken,
     Thanks for your help - and sorry for taking so long to reply.
Your solution of:

Result = 46949.500 - mod("46949.500","100")
Result = 46949.500 - 495
Result = 46454.5

... doesn't seem to work - unless I don't understand how MOD works?

Let me try to restate my problem.

If I have a calculated number of 46949.5, I need it to round the nearest hundreds "after" dropping the decimal.

So the steps would proceed like this:
1. 46,949.5 becomes 46,949
2. 46,949 rounds to the nearest hundreds to become 46,900

Thanks for your help!

Matt Sherrill



>________________________________
> From: Kenneth Brody <kenbrody at spamcop.net>
>To: Matt Sherrill <mmsv45 at yahoo.com>; "filepro-list at lists.celestial.com" <filepro-list at lists.celestial.com> 
>Sent: Tuesday, November 19, 2013 12:38 PM
>Subject: Re: Truncate
> 
>
>On 11/19/2013 11:24 AM, Matt Sherrill wrote:
>> I’m sure this has come up before, but how do
>> you truncate the decimals without FilePro rounding the number?
>>
>> I have 46949.500 that I need to round to the
>> hundredth place (without the decimals).  So I want my result to
>> show "46,900", not "47,000" - which is what is happening now.
>
>Do you want it "without rounding the number" or "round to the hundredth place"?
>
>Assuming you mean that you want to "truncate" (to the "hundreds", not 
>"hundredth"), as implied by your subject, so that "46999.999" becomes 
>"46900" (your example would have the same result whether "truncate" or "round"):
>
>     result = number - mod(number,"100")
>
>If this is not what you meant, please post a better description of what you 
>
>need.
>
>-- 
>Kenneth Brody
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.celestial.com/pipermail/filepro-list/attachments/20131211/95314985/attachment.html 


More information about the Filepro-list mailing list