Round up or down by set variable

  • Thread starter Thread starter Supe
  • Start date Start date
S

Supe

Is there a way to have a number round up or down based on a threshhold it
hits between the two number? I want a number when it hits .8 to round up,
otherwise round down.

For example 1.8 would round up to 2 but 1.79 would round down to 1
2.8 would round up to 3 but 2.79 would round down to 2, etc.
 
Hi,

One way

=IF(MOD(A1,1)>=0.8,CEILING(A1,1),INT(A1))
--
Mike

When competing hypotheses are otherwise equal, adopt the hypothesis that
introduces the fewest assumptions while still sufficiently answering the
question.
 
Supe said:
I want a number when it hits .8 to round up,
otherwise round down. [....]
For example 1.8 would round up to 2 but
1.79 would round down to 1

Ostensibly:

=rounddown(A1,0) + (mod(A1,1)>=0.8)

But that would round 1.795 down to 1, even though it might display as 1.80
(Number with 2 dp). So I wonder if you would be happier with:

=rounddown(A1,0) + (round(mod(A1,1),2)>=0.8)


----- original message -----
 
Back
Top