diff --git a/src/PhpSpreadsheet/Calculation/Statistical.php b/src/PhpSpreadsheet/Calculation/Statistical.php index 3bd14a9d..1df2cb1f 100644 --- a/src/PhpSpreadsheet/Calculation/Statistical.php +++ b/src/PhpSpreadsheet/Calculation/Statistical.php @@ -2329,7 +2329,7 @@ class Statistical if ($mValueCount == floor($mValueCount)) { $returnValue = ($mArgs[$mValueCount--] + $mArgs[$mValueCount]) / 2; } else { - $mValueCount == floor($mValueCount); + $mValueCount = floor($mValueCount); $returnValue = $mArgs[$mValueCount]; } }