JanOlMajti
JanOlMajti

Reputation: 1397

How can i Round in Excel

Whenever the decimal remainder is less than .56 I want to round down (normally decimals between and including 0.50 to 0.55 would round up).

for example:

4,55 rounds down to 4, and
4,56 rounds up to 5

I have a lot of numbers (8,55;13,56;...) Thank you

Upvotes: 0

Views: 998

Answers (3)

Eddy
Eddy

Reputation: 5360

Interesting way of rounding but there are multiple solutions:

The 'clean' way to do it:

=IF(MOD(4.55; 1) > 0.55; ROUNDUP(4.55;0); ROUNDDOWN(4.55;0))

The short and nasty way to do it

=ROUND(4.55 - 0.06; 0)

Upvotes: 6

user1143192
user1143192

Reputation: 9

I really like this answer. This serves the purpose.

=IF(MOD(4.55; 1) > 0,55; ROUNDUP(4.55;0); ROUNDDOWN(4.55;0))

Upvotes: -2

Lloyd Powell
Lloyd Powell

Reputation: 18770

OK, so we first detect whether the decimal is greater than .55, so lets get that (say it's in cell A1). Then we call the appropriate method.

// Get the decimal value, is it greater than 0.55?
if (A1 - INT(A1) > 0.55)
{
  RoundUp(A1, 0);
}
else
{
  RoundDown(A1, 0);
}

Where the 0 represents that you want to round to 0 decimal places.

Excel Round function.

Upvotes: 3

Related Questions