+ Reply to Thread
Results 1 to 14 of 14

How to find top 5 values from data using function

  1. #1
    Registered User
    Join Date
    06-12-2018
    Location
    india
    MS-Off Ver
    2013
    Posts
    93

    How to find top 5 values from data using function

    Hi All,
    Hope you are doing great, i have a data where i have to found top 5 values, could you please let me how to resolve it. thanks
    attached is the data sheet
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    09-30-2019
    Location
    Chiangmai, Thailand
    MS-Off Ver
    Office 2016, Excel 2019
    Posts
    1,234

    Re: How to find top 5 values from data using function

    Please try.

    B5
    =INDEX(Data!$A$1:$A$11,AGGREGATE(15,6,(ROW(Data!$A$1:$A$11)-(ROW(Data!$A$1)-1))/(Data!$B$1:$B$11=C5),COUNTIF($C$4:$C5,$C5)))

    C5
    =LARGE(Data!$B$1:$B$11,ROWS(C$4:C4))

    Regards.

  3. #3
    Forum Expert wk9128's Avatar
    Join Date
    08-15-2020
    Location
    Australia
    MS-Off Ver
    365 V2403 and WPS V2022
    Posts
    3,434

    Re: How to find top 5 values from data using function

    worksheet name : Result

    Cell B5 array formula , Drag down and across

    HTML Code: 

  4. #4
    Registered User
    Join Date
    06-12-2018
    Location
    india
    MS-Off Ver
    2013
    Posts
    93

    Re: How to find top 5 values from data using function

    @wk9128
    Thanks, It is giving Name where there is no data for any name in data sheet, have attached the scenario.
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    06-12-2018
    Location
    india
    MS-Off Ver
    2013
    Posts
    93

    Re: How to find top 5 values from data using function

    @menem
    what actually "AGGREGATE(15,6," this is doing? how can i customize it in large data?

  6. #6
    Forum Expert wk9128's Avatar
    Join Date
    08-15-2020
    Location
    Australia
    MS-Off Ver
    365 V2403 and WPS V2022
    Posts
    3,434

    Re: How to find top 5 values from data using function

    @Merrysa
    array formulas are not entered in the same way as 'standard' formulas. Instead of pressing just ENTER, you first hold down CTRL and SHIFT, and only then press ENTER. If you've done it correctly, you'll notice Excel puts curly brackets {} around the formula
    Attached Images Attached Images
    Attached Files Attached Files
    Last edited by wk9128; 09-30-2021 at 03:04 AM.

  7. #7
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,209

    Re: How to find top 5 values from data using function

    @Merrysa
    Please post a more realistic sample of your data as the first file obviously did not represent your true situation.
    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

  8. #8
    Registered User
    Join Date
    06-12-2018
    Location
    india
    MS-Off Ver
    2013
    Posts
    93

    Re: How to find top 5 values from data using function

    Quote Originally Posted by wk9128 View Post
    @Merrysa
    array formulas are not entered in the same way as 'standard' formulas. Instead of pressing just ENTER, you first hold down CTRL and SHIFT, and only then press ENTER. If you've done it correctly, you'll notice Excel puts curly brackets {} around the formula
    Sorry i am not able to do, can you send me the screen shot how it will look like.

  9. #9
    Forum Expert wk9128's Avatar
    Join Date
    08-15-2020
    Location
    Australia
    MS-Off Ver
    365 V2403 and WPS V2022
    Posts
    3,434

    Re: How to find top 5 values from data using function

    Please see POST#6 attachment and picture

  10. #10
    Registered User
    Join Date
    06-12-2018
    Location
    india
    MS-Off Ver
    2013
    Posts
    93

    Re: How to find top 5 values from data using function

    Quote Originally Posted by wk9128 View Post
    Please see POST#6 attachment and picture
    Thanks, but why i am getting NZ and SA as 0 where blank is in Data sheet. attached the both images

    It shouldn't show NZ and SA is in result sheet if there is no data for those name.
    Attached Images Attached Images

  11. #11
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,923

    Re: How to find top 5 values from data using function

    Because there IS data for them - they have 0, not a blank cell.
    Last edited by AliGW; 09-30-2021 at 04:21 AM. Reason: Typo
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  12. #12
    Forum Expert
    Join Date
    09-30-2019
    Location
    Chiangmai, Thailand
    MS-Off Ver
    Office 2016, Excel 2019
    Posts
    1,234

    Re: How to find top 5 values from data using function

    AGGREGATE( 15 = min , 6 = ignore all errors , .... list of array to verify .... , no of array that not error )

    but list of array to verify is hard for me to explain (due to my english)

    AGGRIEGATE( 15 , 6 , { 50, 60 , #N/A , 9 , #DIV/0 , 1 } , 3 ) will give result 50 because 50 is small value number 3 exclude errors

    Regards.

  13. #13
    Forum Expert wk9128's Avatar
    Join Date
    08-15-2020
    Location
    Australia
    MS-Off Ver
    365 V2403 and WPS V2022
    Posts
    3,434

    Re: How to find top 5 values from data using function

    worksheet name : Result

    HTML Code: 
    Pls Click the left mouse button to select the ranges area B5:B9 ; pls Place the following formula in Formula Bar , then Array formula

    Then Copy ranges area B5:B9 to C5
    Attached Files Attached Files

  14. #14
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,587

    Re: How to find top 5 values from data using function

    In B5
    Please Login or Register  to view this content.
    In C5
    Please Login or Register  to view this content.
    Attached Files Attached Files
    Pl note
    Array formula should be confirmed with Ctrl+Shift+Enter keys together.
    If answere is satisfactory press * to add reputation.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. If function + Find Function to search for multiple values
    By HabsFan89 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 01-21-2015, 12:11 PM
  2. Replies: 1
    Last Post: 04-30-2014, 05:49 PM
  3. Function will not find specific values
    By RTOOMEY25 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 09-19-2013, 03:58 PM
  4. How to compare values with .Find function
    By olafson in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 05-07-2013, 11:48 AM
  5. Function to find close values
    By TCS111 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 04-18-2013, 05:00 AM
  6. Find the same values and then add function
    By traga2whiskys in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 11-05-2011, 02:25 PM
  7. Find Function - Returning Values
    By controlfreak in forum Excel General
    Replies: 1
    Last Post: 06-03-2009, 07:38 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1