Prev: Dates
Next: R1C1 reference
From: Supe on
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.
From: Luke M on
=IF(MOD(A2,1)<0.8,ROUNDDOWN(A2,0),ROUNDUP(A2,0))

--
Best Regards,

Luke M
"Supe" <Supe(a)discussions.microsoft.com> wrote in message
news:83ACBE6E-CCF1-4797-8DDD-9D131C49AB14(a)microsoft.com...
> 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.


From: Mike H on
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" wrote:

> 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.
From: Joe User on
"Supe" <Supe(a)discussions.microsoft.com> wrote in message
news:83ACBE6E-CCF1-4797-8DDD-9D131C49AB14(a)microsoft.com...
> 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 -----

"Supe" <Supe(a)discussions.microsoft.com> wrote in message
news:83ACBE6E-CCF1-4797-8DDD-9D131C49AB14(a)microsoft.com...
> 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.

 | 
Pages: 1
Prev: Dates
Next: R1C1 reference