mirror of
https://github.com/PHPOffice/PhpSpreadsheet.git
synced 2026-09-18 14:06:34 +00:00
Fix for SUMIF(), COUNTIF() and related functions if condition references a blank cell, courtesy of watermark86
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user