DEV Community

Cover image for #64 — Search for Top N Values And Last N Values
Judith-Excel-Sharing
Judith-Excel-Sharing

Posted on

#64 — Search for Top N Values And Last N Values

Problem description & analysis:

Here below is a sales statistical table:

original source table
Task: Now we want to find out the products ranked in the top 10 by sales and their sales, and the last 10 products and their sales.

Solution:

Enter the following formulas in SPL XLL. The results are shown below:
Top 10:
=spl("=E(?1).sort(ProductSales:-1).to(10)",A1:C78)

result table of top 10 values
Last 10:
=spl("=E(?1).sort(ProductSales:-1).to(-10)",A1:C78)

result table of last 10 values


Please feel free to download esProc Desktop and boost your productivity today!⬇️

SPL download address: esProc Desktop FREE Download

Plugin Installation Method: SPL XLL Installation and Configuration

References to other rich Excel operation cases: Desktop and Excel Data Processing Cases

YouTube FREE courses: SPL Programming

Top comments (3)

Collapse
 
martinbaun profile image
Martin Baun

Great guideline! Thanks for sharing

Collapse
 
judith677 profile image
Judith-Excel-Sharing

Thanks for your support! Feel free to try the code and supercharge your Excel sheets!

Collapse
 
judith677 profile image
Judith-Excel-Sharing

Join us to explore the potential of Excel sheets!

💧Discord
💧Reddit