Rounding formulas for negative numbers

P

Pat

I'm trying to round a negative number with the functions floor and ceiling
but I don't get the expected value.
In italian version for floor() and ceiling():
ARROTONDA.DIFETTO(-4,2;-0,5) gets -4
ARROTONDA.ECCESSO(-4,2;-0,5) gets -4,5
instead of -4,5 and -4.
Can someone help me?
Thanks in advance
Patrizia
 
B

bplumhoff

Pat said:
I'm trying to round a negative number with the functions floor and ceiling
but I don't get the expected value.
In italian version for floor() and ceiling():
ARROTONDA.DIFETTO(-4,2;-0,5) gets -4
ARROTONDA.ECCESSO(-4,2;-0,5) gets -4,5
instead of -4,5 and -4.
Can someone help me?
Thanks in advance
Patrizia

Hi Patrizia,

Take for your "ARROTONDA.ECCESSO":
=-ARROTONDA.DIFETTO(-A1;0,5)

And for your "ARROTONDA.DIFETTO":
=-ARROTONDA.ECCESSO(-A1;0,5)

if your numbers are negative and write 4,2 into cell A1.

Regards,
Bernd
 
B

Bob Phillips

To quote help

FLOOR

Regardless of the sign of number, a value is rounded down when adjusted away
from zero. If number is an exact multiple of significance, no rounding
occurs

CEILING

Regardless of the sign of number, a value is rounded up when adjusted away
from zero. If number is an exact multiple of significance, no rounding
occurs

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)
 
J

joeu2004

Bob said:
To quote help
FLOOR
Regardless of the sign of number, a value is rounded down when adjusted away
from zero. If number is an exact multiple of significance, no rounding
occurs

Obvious typo in the Excel Help page: is rounded down when adjusted
__toward__ zero.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top