问题
I am developing a web application made using PHP (withh CodeIgniter as the framework) that should produce an excel file report as as summary of data.
I am using PHPSpreadsheet as a library to generate the .xlsx file and everything is successful.

I was able to display in a certain range of cell the top 5 values of a column ie. Top 5 Publications that has the most number of Articles.
With the use of the code =LARGE(ColumnOfTheDataRange , NumeralValue)
-- I was able to get the top 5 of what I wanted

Then, on the left side of these top 5 data, I need to display the matching Publication Names / Publications. I was able to do it with the function
=INDEX(PublicationNamesCellRange, MATCH(CellOfTheMatchingData, ColumnOfTheDataCellRange, 0))

Now, kindly notice that there are multiple article counts 54 in the top 5 data column (right), which should belong to 2 different Publications. The problem is, what code or technique should I use to produce the unique Publication Name so that it won't repeat the Publication Name E because in the original excel file, the Publication Name E is the first one that has the matching data of 54?
回答1:
This is what I ended up using, edit to your situation.
来源:https://stackoverflow.com/questions/56014349/excel-getting-the-top-5-data-of-a-column-and-their-matching-title-but-produces