amber Lau
amber Lau

Reputation: 1

how to round up or down with the If function

I am trying to make a number round up or round down depending on if it's higher or lower than 0.8

If the number in U6 is for example 16.8, I want cell V6 to round UP to 17.

If the number in U15 is 14.33 I want V15 to round DOWN to 14.

enter image description here

Upvotes: 0

Views: 982

Answers (3)

Ron Rosenfeld
Ron Rosenfeld

Reputation: 60224

If the number to be rounded will always be positive, then try:

=ROUND(U6-0.3,0)

Upvotes: 1

shrivallabha.redij
shrivallabha.redij

Reputation: 5902

Try below formula.

=INT(U6)+((U6-INT(U6))>=0.8)

Depending on the condition put in (U6-INT(U6))>=0.8 the formula will return TRUE or FALSE which will be coerced into 1 or 0 due to arithmetic operation.

Upvotes: 0

Harun24hr
Harun24hr

Reputation: 36870

Use simple round formula like below.

=ROUND(U6,0)

Round() formula with 0 decimal place will automatically round up greater than .5 to its upper integer and round down less than .5 to lower integer.

Upvotes: 0

Related Questions