CHOOSE() returns "#VALUE!" if the 1st entry is chosen
This commit is contained in:
Roman Syroeshko 2013-11-03 21:24:10 -08:00
parent f9f37f566a
commit ded0f6dc13

View File

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