Documentation/Calc Functions/AFRUND.LOFT

    From The Document Foundation Wiki
    This page is a translated version of the page Documentation/Calc Functions/CEILING and the translation is 9% complete.
    Outdated translations are marked like this.


    Funktionsnavn:

    AFRUND.LOFT

    Kategori:

    Matematisk

    Resume:

    Afrunder et tal til det nærmeste multiplum af en signifikant værdi.

    Syntaks:

    AFRUND.LOFT(Number [; Significance [; Mode]])

    Returnerer:

    Returnerer en heltalsværdi.

    Argumenter:

    Tal er det reelle tal, som skal afrundes, eller en reference til en celle, der indeholder tallet.

    Signifikans (valgfri) er den reelle værdi, eller en reference til en celle, der indeholder den værdi, som tallet skal afrundes til et multiplum af. Standardværdien er +1 eller -1 afhængigt af tallets fortegn.

    Tilstand (valgfri) er et tal, eller en reference til en celle, der indeholder et tal. Funktionen bruger kun tilstand, hvis både tallet og den signifikante værdi er negativ. Så hvis tilstand er givet og ikke lig med nul, rundes tallene ned (væk fra nul). Hvis tilstand er lig med nul eller ikke givet, rundes negative tal op (imod nul).

    • If any argument is non-numeric, then AFRUND.LOFT reports a #VÆRDI! error.
    • If one of Number or Significance is positive while the other is negative, then AFRUND.LOFT reports an invalid argument error (Fejl:502).
    • If either Number or Significance is equal to 0, then AFRUND.LOFT returns 0.

    Yderligere oplysninger:

    Details specific to AFRUND.LOFT function

    • With Significance set or defaulted to -1 or +1 (with the same sign as Number) and Mode set or defaulted to 0 or FALSK, AFRUND.LOFT provides functionality that implements the standard mathematical definition of a ceiling value.
    • Warning.svg

      Advarsel:
      Hvis regnearket eksporteres til Microsoft Excel, eksporteres funktionen AFRUND.LOFT som til tilsvarende funktion LOFT.MATEMATIK, der har eksisteret siden Excel 2013. Hvis du planlægger at bruge regnearket med tidligere Excel-versioner, bruger du enten CEILING.PRECISE, der har eksisteret siden Excel 2010 eller LOFT.XCL, der eksporteres som funktionen AFRUND.LOFT, der er kompatibel med alle Excel versioner.


      General information about Calc's ceiling functions

      Note pin.svg

      Bemærk:
      For convenience, the information in this subsection is repeated on all pages describing Calc's ceiling functions.

      General introductory information about ceiling functions can be found at Wikipedia's Floor and ceiling functions page.

      Calc provides five functions that can be used to calculate the ceiling value of a number, and these are:

      The most important of these for many users will be the AFRUND.LOFT function, which implements the requirements laid out in Section 6.17.1 of ODF 1.2, Part 2.

      Calc provides the LOFT.MATEMATIK, LOFT.PRECISE, and ISO.LOFT functions to increase interoperability with Microsoft Excel, which provides three similar functions with the same names. Calc's LOFT.PRECISE and ISO.LOFT perform identical functions.

      Microsoft Excel's AFRUND.LOFT function accepts two arguments and so is not compliant with ODF 1.2. This difference in behaviour could lead to interoperability problems but these are avoided through the provision of the LOFT.XCL function, as follows:

      • When Calc saves a spreadsheet to Excel 2007-365 (*.xlsx) format, any call to Calc's AFRUND.LOFT function is converted to a call to Excel's LOFT.MATEMATIK function, and any call to Calc's LOFT.XCL function is converted to a call to Excel's AFRUND.LOFT function.
      • When Calc opens a spreadsheet in Excel 2007-365 (*.xlsx) format, any call to Excel's AFRUND.LOFT function is converted to a call to Calc's LOFT.XCL function.

      Eksempler:

      Formula Description Returns
      =AFRUND.LOFT(11,5) Significance defaults to +1 and Mode defaults to 0. The function rounds up 11.5 to the nearest integer multiple of +1. 12
      =AFRUND.LOFT(−11,5) Significance defaults to -1 and Mode defaults to 0. The function rounds up -11.5 to the nearest integer multiple of -1. −11
      =AFRUND.LOFT(7; 2,3) Mode defaults to 0. The function rounds up 7 to the nearest integer multiple of 2.3. 9,2
      =AFRUND.LOFT(−7;−2,3) Mode defaults to 0. The function rounds up -7 to the nearest integer multiple of -2.3. −6,9
      =AFRUND.LOFT(D1; D2; D3) where cells D1, D2, and D3 contain the numbers 10, 3, and 1 respectively. The function rounds up the value 10 to the nearest integer multiple of 3. The value of Mode is not significant for a positive number. 12
      =AFRUND.LOFT(−10; −3; 0) With Mode set to 0, the function rounds up the value -10 to the nearest integer multiple of -3. −9
      =AFRUND.LOFT(−10; −3; 7,6) With Mode set to a non-zero value, the function rounds down the value of -10 to the nearest integer multiple of -3. −12
      =AFRUND.LOFT(−3,6; ; SAND()) Significance defaults to -1. With Mode set to a non-zero value, the function rounds down the value of -3.6 to the nearest integer multiple of -1. −4

      Beslægtede LibreOffice-funktioner:

      LOFT.MATEMATIK

      LOFT.PRECISE

      LOFT.XCL

      AFRUND.GULV

      GULV.MAT

      GULV.PRÆCIS

      GULV.XCL

      HELTAL

      ISO.LOFT

      ODF standard:

      Section 6.17.1, part 2

      Tilsvarende Excel-funktioner:

      CEILING.MATH