CHOOSE() returns "#VALUE!" if the 1st entry is chosen
This commit is contained in:
Mark Baker 2013-11-08 11:43:14 -08:00
commit 23c1b6c597

View File

@ -462,7 +462,7 @@ class PHPExcel_Calculation_LookupRef {
return PHPExcel_Calculation_Functions::VALUE(); return PHPExcel_Calculation_Functions::VALUE();
} }
$chosenEntry = floor($chosenEntry); $chosenEntry = floor($chosenEntry);
if (($chosenEntry <= 0) || ($chosenEntry > $entryCount)) { if (($chosenEntry < 0) || ($chosenEntry > $entryCount)) {
return PHPExcel_Calculation_Functions::VALUE(); return PHPExcel_Calculation_Functions::VALUE();
} }