Thanks!

I need something simpler. I don't want to use a loop for this. I can round down with a simple replace, if the 4th digit

is 1-4.

After that, if the 4th digit is anything except 0-4, it should add one to the first three digits. If it's not possible

without a loop, I'll probably round that down anyway - it isn't finance or math, it is just getting back to only 3

significant digits.

Regards,

John

From:

ntb-clips@yahoogroups.com [mailto:

ntb-clips@yahoogroups.com] On Behalf Of Don

Sent: Friday, February 04, 2011 8:24 PM

To:

ntb-clips@yahoogroups.com
Subject: Re: [Clip] Rounding clips

see message 10156

ROUND(1.5955*100)/100 = 1.600000 (Rounded up to the nearest cent)

ROUND(1.59112*100)/100 = 1.590000 (Rounded down to the nearest cent)

ROUND(5285/100)*100 = 5300.00 (Rounded up to the nearest hundred)

ROUND(5249/100)*100 = 5200.00 (Rounded down to the nearest hundred)

CEIL rounds the number up from zero to the next integer if it has a

fractional part and it is a positive number. If it is a negative number,

it rounds the number up towards zero to the next integer.

It does not round it if the number does not have a decimal part.

CEIL(7.9112) = 8.000000000000000

CEIL(-7.9112) = -7.000000000000000

CEIL(7.0000001) = 8.000000000000000

CEIL(-7.0000001) = -7.000000000000000

CEIL(7) = 7.000000000000000

CEIL(-7) = -7.000000000000000

FLOOR rounds the number down toward zero to the next integer if it has a

fractional part and it is a positive number. If it is a negative number it

rounds the number down from zero to the next integer.

It makes no change if it does not have a decimal part.

FLOOR(7.9112) = 7.000000000000000

FLOOR(-7.9112) = -8.000000000000000

FLOOR(7.0000001) = 7.000000000000000

FLOOR(-7.0000001) = -8.000000000000000

FLOOR(7) = 7.000000000000000

FLOOR(-7) = -7.000000000000000

On 2/4/2011 11:15 PM, John Shotsky wrote:

> Has anyone written any clips to perform rounding of numbers? I want to round up if the 4th digit is 5-9. I just change

> it to zero if it is 1-4.

>

> Here are a couple example numbers:

> 19945

> 19967

>

> The first result should be 19900 (which is easy, and I do that first, using a range with [1-4])

> The second result should be 20000 (based on the 4th digit rounding up.)

>

> Thanks,

> John

>

>

> [Non-text portions of this message have been removed]

>

>

>

> ------------------------------------

>

> Fookes Software: http://www.fookes.com/

> NoteTab website: http://www.notetab.com/

> NoteTab Discussion Lists: http://www.notetab.com/groups.php

>

> ***

> Yahoo! Groups Links

>

>

>

>

[Non-text portions of this message have been removed]