Rounding

M

Mark

I want to take a value (the sum of a column), divide by 10 to the nearest .5, how do I do that?
 
P

Pat Garard

G'Day Mark,

Try this:

{ =INT(SUM(ABOVE)/5 + 0.5)/2 \# "#,##0.0" }


You may change "ABOVE" to a list ("A1,A3,B5") as
you please.

Rounding to nearest "0.5" is performed by :

{ =INT(XX*2 + 0.5)/2 \# "#,##0.0" }

where "XX" is a reference to the quantity to be rounded.

In your case this is modified by your need to also
divide by 10.
--
Regards,
Pat Garard
Australia

______________________________________
 
G

Greg Maxey

Pat,

Good O'

If I might offer an enhancement. Your numeric switches have the unfortunate
effect of leaving a hanging zero e.g., 50.0

I realize that this looks like a hair ball in field code, but in display and
print 50 looks better than 50.0

{ IF { =OR({ =ROUND({ Your Formula Field Here },1) }={ =INT({ Your Formula
Field Here }) },{ =ROUND({ Your Formula Field Here },1) }={ +INT({ Your
Formula Field Here } + 1) }) = "1" "{ Your Formula Field Here \# ",0" }"
"{ Your Formula Field Here \# "0.0)" }" }


Note: Your formula field here minus the numeric swithes.
 
P

Pat Garard

An absoulutely BRILLIANT exposition.

However, we Engineers prefer to see 50.0 -
it tells us that there IS a decimal AND that
its rounding places it at Zero, with or without
'swithes'
--
Regards,
Pat Garard
Australia

______________________________________
 

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