Rank formula not working #3931
Closed
johnaddisco
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
i am trying to rank students based on their total scores stored, say F9 to F20, and print the results in G9 to G20. I began to print the first rank in G9, but it was not working. i got an error. Please, I need your help. Thanks
sample code:
$rankFormula = '=RANK.EQ(F9, $F$9:$F$20, 0)';
$sheet1->setCellValue('G9', $rankFormula);
$sheet1->getCell('G9')->getCalculatedValue();
Error:
Fatal error: Uncaught PhpOffice\PhpSpreadsheet\Calculation\Exception: Sheet1!G9 -> Formula Error: Unexpected , in C:\xampp\htdocs\phpSpreadsheet\vendor\phpoffice\phpspreadsheet\src\PhpSpreadsheet\Cell\Cell.php:277 Stack trace: #0 C:\xampp\htdocs\phpSpreadsheet\linksheet.php(31): PhpOffice\PhpSpreadsheet\Cell\Cell->getCalculatedValue() #1 {main} thrown in C:\xampp\htdocs\phpSpreadsheet\vendor\phpoffice\phpspreadsheet\src\PhpSpreadsheet\Cell\Cell.php on line 277
Beta Was this translation helpful? Give feedback.
All reactions