diff --git a/PHPExcel/Calculation.php b/PHPExcel/Calculation.php index fe62d14..b5d5591 100644 --- a/PHPExcel/Calculation.php +++ b/PHPExcel/Calculation.php @@ -3440,7 +3440,22 @@ class PHPExcel_Calculation { $arg = PHPExcel_Calculation_Functions::flattenSingleValue($arg); } unset($arg); - $result = call_user_func_array($functionCall,$args); + + // Remove the non-values + if(is_array($args)){ + $args = array_diff($args, array("#VALUE!")); + if (count($args) === 0) { + $result = ""; + }else{ + $result = call_user_func_array($functionCall,$args); + } + }else{ + if($args == "#VALUE!"){ + $result = ""; + }else{ + $result = call_user_func_array($functionCall,$args); + } + } } // } if ($functionName != 'MKMATRIX') {