### LARGE() Function–Get the top N values from a list

This is a real situation that many of us already experienced! We have a list of data and we need to get the top N values from that list. Of course we can sort descending the list and get the top values, but many times we can’t sort the source data (it may be used on another report, for instance). We can use the LARGE() function to get the nth largest value from a range of values. The syntax is like this:
LARGE(array, k)
array is the range of data from where we want to get our top values
k is the position on the range of data to return
So, let’s see an example on how to apply this function to get our top values. Our source data is like this:
In this example we want to get the Top 5 companies by Invoices value. We will be putting the values on cells B17:C21.
To start, let’s put the numbers 1 to 5 on cells A17:A21. Now, on cell C17 let’s put our formula, like this:
=LARGE(\$C\$3:\$C\$15, A17)
We will be looking on cells C3:C15, where we have our Invoices values, for the first largest value, that why we are using cell A17 that has the number 1 on it. Use the dollar signs on the array argument so that when we copy the formula to the next rows it will keep the reference to our Invoices values that are on C3:C15. Now copy the formula on cell C17 to the rest of the cells (C18:C21). This is how our sheet should look like:
So, now we have the top 5 Invoices values but wee need to fill the companies names. For that we will use the MATCH() function to get the row number within range C3:C15 that has the value that matches C17. The MATCH formula will be like this:
=MATCH(C17,\$C\$3:\$C\$15,0)
For the value in C17, this formula would return 10 because the value on this cell is coming from row 10 of our range source. This is not row 10 of our sheet but row 10 of our source! Now with this information we can get the company name that is on this row. For that we will use the INDEX() function like this:
=INDEX(\$B\$3:\$ B\$15,10)
This would get the company’s name on row 10 of our source data.
Combining both formulas, it will look like this:
=INDEX(\$B\$3:\$B\$15,MATCH(C17,\$C\$3:\$C\$15,0))
Put this formula on cell B17 and copy to the other cells on B18:B21.
The result will be like this, where we get on cells B17:C21 the top 5 values of Invoices from our source data on B3:C15:

#### 98 comentários:

Anonymous said...

Thanks for the help! However, it is causing the cells to be incorrectly labeled when it encounters two or more of the same value.

jppinto said...

It's true! This solution is for lists that don't have duplicated values.

Anonymous said...

I agree with your solution. Here is another good explaination of the Large formula...

http://excelprofessor.blogspot.com/2011/10/dashboard-top-5-values-bottom-5-values.html

Anonymous said...

Thank you

Anonymous said...

Any ideas how to use this for whole numbers with duplicates?

Really appreciate some help if anyone knows the answer.

Anonymous said...

THanks a lot this turned out to be most helpful in solving our problem

Regards
HEMANT AND AYUSH
JIM, NOIDA
PGDM (2012-14)
SUBJECT-MIS...
TRIM-3

Anonymous said...

While this is an interesting and informative exercise this as not a good solution for the stated problem. As others have said it will give incorrect results if there are duplicate values for N.

Anonymous said...

What if you had another criteria such as Region of the country that you want to pull in the top 5 as you've done here but also want to specify a certain region which would be located within the data on each line?

Anonymous said...

Good work...
dear one
but i have one more situation where i need ur help
Company Sales
Name (in cr)
A 60
B 56
C 42
D 87
E 80
F 87
G 82
I 10
J 87
L 10

NOW I need to FIND TOP 5 COMPANIES NAME WITH SALES AMOUNT.(i.e. D,F J G and A) but it will gives result as like D D D G A

ur reply is highly expected with regards

Unknown said...

this is good post...

i like this...

http://bantalsilikon01.blogspot.com/
http://bantalsilikon01.blogdetik.com/
http://bantalkekabumurah.blogspot.com/
http://bumbupecel1.blogspot.com/
http://bantalgood.blogspot.com/
http://bantalsilikonmalang1.blogspot.com/
http://bantalsilikonmurah.blogspot.com/

http://marinirseo.blogspot.com/
http://marinirseo.blogspot.com/
http://marinirseo.blogspot.com/

tengs very much...

Anonymous said...

What happens if the value is exactly same as another, will this not give error?

Anonymous said...

A quick workaround would be to make value unique by adding a small fraction to the value e.g. +ROW()*10^-6

Daniel Gligor said...

Thanks for the Large formula.

Tips Excel said...

easy excel rank
thanks

JClark4321 said...

Hah, "+ROW()*10^-6" is brilliant. And then just formatting the cell as a number to only show however many decimals you want. Perfect :)

Anonymous said...

so how does the "+ROW()*10^-6" still work with the Match(index) portion of the formula? When I use that, I am no longer returning back a matching value. I have duplicates, and need to get each line to come back.

appreciate any help on this, as the first part of this was a HUGE win for me

Anonymous said...

check this out for duplicates https://www.youtube.com/watch?v=rKDI-kdBsjY

Anonymous said...

GREAT!!!! EASY TO UNDERSTAND EXPLANATION OF GETTING TOP 5!!!

THE FIRST ONE I FOUND I COULD NOT GET IT TO WORK AND THEN FOUND THIS .....IT WORKED MY FIRST TRY!!!

Anonymous said...

In the above example, why to use LARGE formula? We find Large (top) five by using Descending order and Small five by Ascending order.

RAHUL , UNLEASHED said...

Hi Thanks it works.
How will it be done for a row based ???
Wrote this formula for a row search
=INDEX(\$B\$1:\$Z\$1,MATCH(D29,\$B\$6:\$Z\$6,0))

clientsest said...
This comment has been removed by the author.
clientsest said...
This comment has been removed by the author.
clientsest said...
This comment has been removed by the author.
clientsest said...
This comment has been removed by the author.
فريق دليل اعلانك said...
This comment has been removed by the author.
فريق دليل اعلانك said...
This comment has been removed by the author.
فريق دليل اعلانك said...
This comment has been removed by the author.
فريق دليل اعلانك said...
This comment has been removed by the author.
فريق دليل اعلانك said...
This comment has been removed by the author.
فريق دليل اعلانك said...
This comment has been removed by the author.
services said...
This comment has been removed by the author.
services said...
This comment has been removed by the author.
services said...
This comment has been removed by the author.
services said...
This comment has been removed by the author.
services said...
This comment has been removed by the author.
services said...
This comment has been removed by the author.
services said...
This comment has been removed by the author.
فريق دليل اعلانك said...
This comment has been removed by the author.
فريق دليل اعلانك said...
This comment has been removed by the author.
فريق دليل اعلانك said...
This comment has been removed by the author.
فريق دليل اعلانك said...
This comment has been removed by the author.
فريق دليل اعلانك said...
This comment has been removed by the author.
Arabic said...

Specialized Services Area 10 is a professional company in Kuwait, based on Kuwait Satellite Technician, Renewal of satellite subscription, installation and installation,

فني ستلايت الكويت

services said...
This comment has been removed by the author.
services said...
This comment has been removed by the author.
EST said...
This comment has been removed by the author.
EST said...
This comment has been removed by the author.
easa said...

شراء الاثاث المستعمل بالكويت - نشتري الاثاث المستعمل بالكويت
used furniture kuwait
Used Furniture Kuwait
https://themeforest.net/user/usedfurniturekw27
شراء اثاث مستعمل بالكويت
https://www.colourlovers.com/lover/usedfurniturekw27
نشتري الاثاث المستعمل بالكويت

easa said...
easa said...
EST said...
This comment has been removed by the author.
EST said...
This comment has been removed by the author.
EST said...
This comment has been removed by the author.
clientsest said...
This comment has been removed by the author.
clientsest said...
This comment has been removed by the author.
EST said...
This comment has been removed by the author.
EST said...
This comment has been removed by the author.
Solutions said...
This comment has been removed by the author.
Solutions said...
This comment has been removed by the author.
emailcampaign said...
This comment has been removed by the author.
emailcampaign said...
This comment has been removed by the author.
emailcampaign said...
This comment has been removed by the author.
emailcampaign said...
This comment has been removed by the author.
emailcampaign said...
This comment has been removed by the author.
emailcampaign said...
This comment has been removed by the author.
emailcampaign said...
This comment has been removed by the author.
emailcampaign said...
This comment has been removed by the author.
emailcampaign said...
This comment has been removed by the author.
services said...
services said...
services said...
services said...
services said...
services said...
services said...
services said...
services said...
services said...
services said...
services said...
clientsest said...
clientsest said...
clientsest said...
clientsest said...
clientsest said...
clientsest said...
clientsest said...
clientsest said...
clientsest said...
clientsest said...
clientsest said...
clientsest said...
clientsest said...
Unknown said...

شركة دانة الزهراء فني تكييف مركزي الكويت و تصليح وحدات تكييف وصيانة مكيفات و تصليح ثلاجات
"
و فني تصليح غسالات اتوماتيك تصليح من فنيين معتمدين على مدار 7 أيام 24 ساعه خدمات منزل جميع مناطق الكويت"
فني تكييف

Mark_Glesson said...

We provide the highest quality in mold remediation services, asbestos removal & water dry out in Maricopa County including Phoenix, Mesa, Chandler, Glendale, Scottsdale, and Gilbert! visit us for more information Best Blown In Insulation Attic Insulation | Best Drain Cleaning Services Arizona | Best Reverse Osmosis Services Arizona | Best Plumbing Services Arizona | Best Plumbing Inspection Services Arizona

Unknown said...

Company descriptions :-
موقع كويت 24 ساعة هو افضل موقع اخباري عربي متخصص في اخبار دولة الكويت والخليج العربي والعالم بأكمله، تابع معنا اخر اخبار الكويت لحظة بلحظة.
Kuwait 24 hours

Unknown said...

فني تكييف الكويت تقدم لكم جميع خدمات فني تكييف ٢٤ ساعه و تصليح مكيفات و فني تكييف مركزي هندي
، صيانة تكييف مركزي و تصليح تكييف مركزي و تصليح وحدات تكييف
تركيب تكييف و كمبروسرات جديد و مستامل جميع مناطق بالكويت
فني تكييف

Unknown said...