6.2 Search for top N, last N

 

Here below is a sales statistical table:

imagepng

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. The results are shown as below:

Top 10:

=spl("=E(?1).sort(ProductSales:-1).to(10)",A1:C78)

imagepng

Last 10:

=spl("=E(?1).sort(ProductSales:-1).to(-10)",A1:C78)

imagepng