# Documentation/Calc Functions/AFRUND

This page is a translated version of the page Documentation/Calc Functions/ROUND and the translation is 5% complete.
Outdated translations are marked like this.
Other languages:

AFRUND

Matematisk

## Resume:

Afrunder et tal til et bestemt antal decimalpladser.

## Syntaks:

AFRUND(Number[; Count])

## Returnerer:

Returnerer en reel værdi, som er tallet afrundet til antal decimalpladser.

## Argumenter:

Tallet er et reelt tal eller en reference til cellen, der indeholder det tal, som skal afrundes.

Antal er et heltal eller en reference til cellen, der indeholder det heltal, som er antallet af decimalpladser, som tallet skal afrundes til.

Hvis antallet udelades eller er 0, afrunder funktionen til det nærmeste heltal. Hvis antallet er negativt, afrunder funktionen til nærmeste 10, 100, 1000 osv.

The following conditions (including errors) may be encountered:

• If either Number or Count is non-numeric, then AFRUND reports a #VÆRDI! error.
• If Count is a non-integer value, then it is rounded to the next integer in the direction of 0.

## Yderligere oplysninger:

Denne funktion afrunder til det nærmeste tal, se RUND.OP og RUND.NED som alternativer.

• If you obtain unexpected results from AFRUND, check the following:
1. Make sure that the number of displayed decimal places is not affected by the setting of the Limit decimals for general number format option in the General Calculations area of the Tools ▸ Options ▸ LibreOffice Calc ▸ Calculate dialog (LibreOffice ▸ Preferences ▸ LibreOffice Calc ▸ Calculate on macOS).
2. Access the Numbers tab on the Format Cells dialog (Format ▸ Cells or equivalent interaction) to make sure that relevant cells do not have formatting applied that affects the number of displayed decimal places.

## Eksempler:

Formula Description Returns
=AFRUND(2,348; 2) Here the function rounds 2.348 to 2 decimal places. 2,35
=AFRUND(D1; D2) where cells D1 and D2 contain the numbers -32.4834 and 3.2 respectively. The value of the Count argument is truncated to 3. Here the function rounds -32.4834 to 3 decimal places. −32,483
=AFRUND(2,348; 0) Here the function rounds 2.348 to the nearest integer. The alternative formula =AFRUND(2.348) returns the same value. 2
=AFRUND(2,5) Here the function rounds 2.5 to the nearest integer. However, since 2.5 is equidistant from 2 and 3, the value 3 is selected. 3
=AFRUND(887,65; −2) Here the function rounds 887.65 to the nearest hundred. 900

AFRUND