PHPSpreadsheet generates an error “Wrong number of arguments for INDEX() function: 5 given, between 1 and 4 expected”

后端 未结 1 1013
有刺的猬
有刺的猬 2021-01-26 19:44

I tried to enter the following code in my excel formula bar directly =INDEX($E$4:$E$132,AGGREGATE(15,6,ROW($1:$30) / ($J$4:$J$132=M4), COUNTIF($M$4:M4, M4))) and wo

相关标签:
1条回答
  • 2021-01-26 20:04

    I have found out that the PHPSpreadsheet library for PHP is yet to allow the usage of the AGGREGATE() and complicated formulas/functions, so I had found another way around

    By using this excel code

    =INDEX(E$2:E$38,IF(M4=M3,MATCH(L3,E$2:E$38,0),0)+MATCH(M4,OFFSET(J$2,IF(M4=M3,MATCH(L3,E$2:E$38,0),0),0,COUNT(J$2:J$38)-IF(M4=M3,MATCH(L3,E$2:E$38,0),0),1),0))

    I was able to traverse through my entire range and make sure that no duplicate publication names would appear

    This is in relation with the my other question -> Excel - Getting the 2nd or nth matched string from your corresponding data

    0 讨论(0)
提交回复
热议问题