TRUNC vs ROUND

G

Guest

Is there any difference for calcultation purposes between TRUNC and ROUND?
If I have a forumla in a cell that results in 25.6 and I need to use that
number in another calculation but it needs to be 25 - does it matter which
formula (TRUNC or ROUND) I use?
 
R

Reetesh B. Chhatpar

TRUNC function eliminates all the decimal places, where as ROUND function
rounds up the decimal values.

For example:
TRUNC(100.99) will return 101
ROUND(100.99) will return 100

I hope this helps !

Reetesh B. Chhatpar
ShawMan Software Enterprises
www.shawmansoftware.com

Diamond is just another piece of coal that did well under pressure.
 
J

Jerry W. Lewis

TRUNC(x) and ROUNDDOWN(x,0) will remove the fractional part of any number.

INT(x) will replace x with the closest integer that is no greater than
x, but -25 > -25.6, so INT(-25.6) will be -26.

ROUND(x,0) will go down or up as needed to get to the closest integer,
thus ROUND(25.6,0) will be 26, not 25.

Jerry
 
J

Jay Somerset

TRUNC function eliminates all the decimal places, where as ROUND function
rounds up the decimal values.

For example:
TRUNC(100.99) will return 101
ROUND(100.99) will return 100

Nope! You've got this backwards, with an error as well.

ROUND requires 2 arguments: ROUND(100.99,0) will give 101 (not 100).
TRUNC(100.99) will give 100 (not 101).
ROUNDDOWN(100.99,0) will also give 100.
 
G

Guest

No, I do not have it backward. The top part of my polst was the original.
TRUNC, as we are both saying now (and I've been saying all along) eliminates
the decimals without rounding.
I did not write the "For example" part
I wrote the "That's backward. It should be:" part

tj
 

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