Documentation/Calc Functions/MULTINOMIAL

From The Document Foundation Wiki
Jump to navigation Jump to search
This page is a translated version of the page Documentation/Calc Functions/MULTINOMIAL and the translation is 42% complete.
Outdated translations are marked like this.
Other languages:
English • ‎dansk






Returnerer fakultetstallet af argumenternes sum divideret med produktet af argumenternes fakultetstal.


MULTINOMIAL(tal 1 [; tal 2 [; … [; tal 255]]])


Returnerer en heltalsværdi.


Tal 1, tal 2, … , tal 255 er tal, referencer til celler eller til celleområder med tal.

  • Hvis et argument er et reelt tal med ikke-heltals og ikke-negativ værdi, bruger funktionen tallets gulvværdi, dvs. trunkerer det til heltal.
  • Hvis ét argument er negativt, returnerer funktionen en fejlværdi.
  • A positive integer, or an expression that evaluates to a positive integer.
  • A reference to a single cell containing a positive integer.
  • A simple reference to a cell range containing positive integers (for example, A1:B9).
  • The name of a named range, comprising cells containing positive integers.
  • The name of a database range, comprising cells containing positive integers.
  • An inline array of positive integers (for example, {1, 2, 3, 4}).

Note that although MULTINOMIAL can accept up to 255 arguments, each argument could specify a range of cells. This means that the number of positive integers processed could be many more than 255. Beware however that MULTINOMIAL can return very large values from relatively small argument values – for example, the formula =MULTINOMIAL(7; 8; 9) returns the value 8413788240.

The following conditions (including errors) may be encountered:

  • If any argument is a string in quotation marks, or a reference to a single cell that contains a string rather than a positive integer, then MULTINOMIAL reports an error. This will be either a #VALUE! error or an invalid argument error (Err:502), depending on the values of other arguments.
  • Text and empty cells within a data range are ignored.
  • If any value is less than or equal to -1, then MULTINOMIAL reports an invalid argument error (Err:502). Values lying in the range -1 < x < 0 are rounded up to 0.0.
  • If any positive value is not an integer, that value is truncated to its floor value.
  • If after any truncation all supplied values are equal to 0, then MULTINOMIAL returns the value 1.

Yderligere oplysninger:

Formlen for MULTINOMIAL er:

  • For the set of k values N1Nk, MULTINOMIAL implements the following formula:

[math]\displaystyle{ \text{MULTINOMIAL}(N_1, N_2, ..., N_k)~=~\frac{(N_1+N_2+ ... +N_k)!}{N_1! \times N_2!\times ... \times N_k!} }[/math]


Formula Description Returns
=MULTINOMIAL(1; 2) Here the function calculates [math]\displaystyle{ \left(\frac{(1+2)!}{1!\times2!}\right) }[/math] and returns 3. 3
=MULTINOMIAL(1; 2; 3) Here the function calculates [math]\displaystyle{ \left(\frac{(1+2+3)!}{1!\times2!\times3!}\right) }[/math] and returns 60. 60
=MULTINOMIAL(D1:D3) where cells D1 to D3 contains the numbers 2, 3 and 4 respectively. Here the function calculates [math]\displaystyle{ \left(\frac{(2+3+4)!}{2!\times3!\times4!}\right) }[/math] and returns 1260. The formula =MULTINOMIAL(D1; D2; D3) would give the same result. 1260
=MULTINOMIAL(4.4; 5.5; 6.6) The three argument values are truncated to 4, 5, and 6 respectively. Here the function calculates [math]\displaystyle{ \left(\frac{(4+5+6)!}{4!\times5!\times6!}\right) }[/math] and returns 630630. The formula =MULTINOMIAL(4; 5; 6) gives exactly the same result. 630630
=MULTINOMIAL ({7; 6; 1; 0}) Here the function calculates [math]\displaystyle{ \left(\frac{(7+6+1+0)!}{7!\times6!\times1!\times0!}\right) }[/math] and returns 24024. 24024

Beslægtede LibreOffice-funktioner:

ODF standard:

Tilsvarende Excel-funktioner: