Fix for SUMIF(), COUNTIF() and related functions if condition references a blank cell, courtesy of watermark86
This commit is contained in:
parent
9331422a8a
commit
de2248d1d4
|
@ -308,6 +308,8 @@ class PHPExcel_Calculation_Functions {
|
|||
|
||||
public static function _ifCondition($condition) {
|
||||
$condition = PHPExcel_Calculation_Functions::flattenSingleValue($condition);
|
||||
if (!isset($condition{0}))
|
||||
$condition = '=""';
|
||||
if (!in_array($condition{0},array('>', '<', '='))) {
|
||||
if (!is_numeric($condition)) { $condition = PHPExcel_Calculation::_wrapResult(strtoupper($condition)); }
|
||||
return '='.$condition;
|
||||
|
|
Loading…
Reference in New Issue