PhpSpreadsheet/tests/data/Calculation/LookupRef
Arne Jørgensen 73c336ac96
Fix exact MATCH on ranges with empty cells (#1520)
Fixes a bug when doing exact match on ranges with empty cells.

```php
<?php

require 'vendor/autoload.php';

use PhpOffice\PhpSpreadsheet\Spreadsheet;

$spreadsheet = new Spreadsheet();
$sheet = $spreadsheet->getActiveSheet();

// Row: 1, null, 4, null, 8.
$sheet->getCell('A1')->setValue(1);
$sheet->getCell('A3')->setValue(4);
$sheet->getCell('A5')->setValue(8);

$sheet->getCell('B1')->setValue('=MATCH(4, A1:A5, 1)');

// Should echo 3, but echos '#N/A'.
echo $sheet->getCell('B1')->getCalculatedValue() . PHP_EOL;

// Row: 1, null, 4, null, null.
$sheet->getCell('C1')->setValue(1);
$sheet->getCell('C3')->setValue(4);

$sheet->getCell('D1')->setValue('=MATCH(5, C1:C5, 1)');

// Should echo 3, but echos '#N/A'.
echo $sheet->getCell('D1')->getCalculatedValue() . PHP_EOL;
```
2020-06-19 20:51:46 +02:00
..
CHOOSE.php Update PHP-CS-Fixer rules 2020-05-18 13:49:57 +09:00
COLUMNS.php COLUMNS and ROWS functions crashed in some cases 2018-01-13 18:01:50 +09:00
FORMULATEXT.php Fix for worksheet lookup for worksheets with spaces in the title 2019-07-24 22:15:35 -07:00
HLOOKUP.php Update PHP-CS-Fixer rules 2020-05-18 13:49:57 +09:00
INDEX.php INDEX(): fix getting row and col numbers from references (#239) 2017-10-06 14:01:20 +09:00
LOOKUP.php Update PHP-CS-Fixer rules 2020-05-18 13:49:57 +09:00
MATCH.php Fix exact MATCH on ranges with empty cells (#1520) 2020-06-19 20:51:46 +02:00
ROWS.php COLUMNS and ROWS functions crashed in some cases 2018-01-13 18:01:50 +09:00
VLOOKUP.php Update PHP-CS-Fixer rules 2020-05-18 13:49:57 +09:00