Documentation/Calc Functions/AFKORT

From The Document Foundation Wiki
Jump to navigation Jump to search
This page is a translated version of the page Documentation/Calc Functions/TRUNC and the translation is 12% complete.
Outdated translations are marked like this.
Other languages:
English • ‎Nederlands • ‎dansk • ‎español • ‎עברית

Template:Documentation/Calc Functions/Func Page Links/da

Funktionsnavn:

AFKORT

Kategori:

Matematisk

Resume:

Afkorter et tal ved at fjerne decimalpladserne.

Syntaks:

AFKORT(Number[; Count])

Returnerer:

Returnerer tallet til højst antal pladser. Overskydende decimalpladser fjernes helt enkelt, uanset fortegn.

Argumenter:

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

Antal(valgfrit) er et heltal, der bestemmer afkortningens nøjagtighed. Standardværdien for antal er 0, hvorfor funktionen returnerer heltalsdelen af tallet.

Hvis antallet er en ikke-heltalsværdi, så antager funktionen antallets gulvværdi, dvs. afkorter det til et heltal.

Yderligere oplysninger:

  • If you obtain unexpected results from AFKORT, 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:

Template:Calc-Formula/da Template:Calc-Description/da Template:Calc-Returns/da
=AFKORT(2,348; 2) Here the function rounds 2.348 toward 0, to 2 decimal places. 2,34
=AFKORT(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 toward 0, to 3 decimal places. -32,483
=AFKORT(2,648; 0) Here the function rounds 2.648 toward 0, to the next integer. The alternative formula =AFKORT(2.648) returns the same value. 2
=AFKORT(-45,67) Here the function rounds -45.67 toward 0, to the next integer. -45
=AFKORT(987,65; -2) Here the function rounds 987.65 toward 0, to the next hundred. 900

Beslægtede LibreOffice-funktioner:

HELTAL

AFRUND

RUND.NED

RUND.OP

ODF standard:

Section 6.17.8, part 2

Tilsvarende Excel-funktioner:

AFKORT