+ Reply to Thread
Results 1 to 17 of 17

How can you return the top 10 ascending text?

  1. #1
    Registered User
    Join Date
    07-08-2014
    Location
    Ontario, Canada
    MS-Off Ver
    2010
    Posts
    20

    Question How can you return the top 10 ascending text?

    Hi All,

    I have a question:

    There is a list that contains provinces, a name, and a number.

    How can I find the top 10 names in descending order (highest num to lowest) for a specific province?

    Eg. Column A
    BC, ON, QC, BC, BC

    Column B
    Mary, Jane, Jack, Rudy, Hank

    Column C
    8,3,15, 20, 5

    Column D
    Top 3 for BC: Rudy, Mary, Hank

    Thanks!

  2. #2
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: How can you return the top 10 ascending text?

    use a pivot table for that kind of work.
    Notice my main language is not English.

    I appreciate it, if you reply on my solution.

    If you are satisfied with the solution, please mark the question solved.

    You can add reputation by clicking on the star * add reputation.

  3. #3
    Registered User
    Join Date
    07-08-2014
    Location
    Ontario, Canada
    MS-Off Ver
    2010
    Posts
    20

    Re: How can you return the top 10 ascending text?

    is there no formula? I would like to have this on a dashboard which automatically finds this information when data is updated without the manual manipulation of using a pivotable.

    Thanks!
    Last edited by newyorktimes; 08-21-2014 at 01:24 PM.

  4. #4
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: How can you return the top 10 ascending text?

    Put this ARRAY formula in D1, then copy down:

    =INDEX($B$1:$B$5, MATCH(LARGE(IF($A$1:$A$5="BC", $C$1:$C$5, ""), ROW(A1)), $C$1:$C$5, 0))

    ...confirmed by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER. You will know the array is active when you see curly braces { } appear around your formula. If you do not CTRL+SHIFT+ENTER you will get an error or a clearly incorrect answer. Press F2 on that cell and try again.

    http://screencast.com/t/oZKCAGdU2
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  5. #5
    Registered User
    Join Date
    07-08-2014
    Location
    Ontario, Canada
    MS-Off Ver
    2010
    Posts
    20

    Re: How can you return the top 10 ascending text?

    Quote Originally Posted by JBeaucaire View Post
    Put this ARRAY formula in D1, then copy down:

    =INDEX($B$1:$B$5, MATCH(LARGE(IF($A$1:$A$5="BC", $C$1:$C$5, ""), ROW(A1)), $C$1:$C$5, 0))

    ...confirmed by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER. You will know the array is active when you see curly braces { } appear around your formula. If you do not CTRL+SHIFT+ENTER you will get an error or a clearly incorrect answer. Press F2 on that cell and try again.

    http://screencast.com/t/oZKCAGdU2
    I'm not sure why but when applying this to my data, I do not get the correct results. I am using an array, but it seems the order is not from the highest number (column C) to the lowest number. Any ideas?

    Thanks again for the prompt response

  6. #6
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: How can you return the top 10 ascending text?

    Hi,

    Can you post an actual workbook with an example and your expected results?

    Difficult to be sure of what you want with your pasted data.

    Regards
    Click * below if this answer helped

    Advanced Excel Techniques: http://excelxor.com/

  7. #7
    Registered User
    Join Date
    07-08-2014
    Location
    Ontario, Canada
    MS-Off Ver
    2010
    Posts
    20

    Re: How can you return the top 10 ascending text?

    UPDATED CORRECT FILE...seems there is no way to delete the old ones.

    please let me know if there is a way to make the top 10 list dynamic with forumlas so if data changes in column A-C, it will be reflected within the Top 10 table.

    Thanks!
    Attached Images Attached Images
    Last edited by newyorktimes; 08-21-2014 at 02:15 PM.

  8. #8
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: How can you return the top 10 ascending text?

    in a jpg we can;t work.

    with an pivot table (as already) stated, you can get your desired result.

    i believe the solution of JBeaucaire will als work.

  9. #9
    Registered User
    Join Date
    07-08-2014
    Location
    Ontario, Canada
    MS-Off Ver
    2010
    Posts
    20

    Re: How can you return the top 10 ascending text?

    How can i post the workbook?

  10. #10
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: How can you return the top 10 ascending text?

    Attach a sample workbook. Make sure there is just enough data to demonstrate your need. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and use the paperclip icon to open the upload window.

    View Pic

    Your file must be smaller than 1mb, zip it up if needed.

  11. #11
    Registered User
    Join Date
    07-08-2014
    Location
    Ontario, Canada
    MS-Off Ver
    2010
    Posts
    20

    Re: How can you return the top 10 ascending text?

    Quote Originally Posted by JBeaucaire View Post
    Attach a sample workbook. Make sure there is just enough data to demonstrate your need. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and use the paperclip icon to open the upload window.

    View Pic

    Your file must be smaller than 1mb, zip it up if needed.
    Attached, thanks!
    Attached Files Attached Files

  12. #12
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: How can you return the top 10 ascending text?

    with an pivot table.

    see the attached file.

  13. #13
    Registered User
    Join Date
    07-08-2014
    Location
    Ontario, Canada
    MS-Off Ver
    2010
    Posts
    20

    Re: How can you return the top 10 ascending text?

    Quote Originally Posted by oeldere View Post
    with an pivot table.

    see the attached file.
    I understand this works as a pivot table, however the formatting does not quite suit my needs as I would like to create a single page dashboard - is there a modification to the existing formulas in the TOP 10 tab that can support this?

    Thanks for the help,

  14. #14
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: How can you return the top 10 ascending text?

    with 4 pivot tables

    see the attached file.

  15. #15
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: How can you return the top 10 ascending text?

    Or, with a couple of array formulas**:

    In G3:

    =INDEX(DATA!$B$2:$B$51,MATCH(1,(DATA!$A$2:$A$51="QC")*(DATA!$C$2:$C$51='TOP 10'!H3),0))

    In H3:

    =LARGE(IF(DATA!$A$2:$A$51="QC",DATA!$C$2:$C$51),ROWS($1:1))

    Copy down as required.

    Regards


    **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 (though do not attempt to manually insert these yourself).

  16. #16
    Registered User
    Join Date
    07-08-2014
    Location
    Ontario, Canada
    MS-Off Ver
    2010
    Posts
    20

    Re: How can you return the top 10 ascending text?

    awesome thanks all!!

  17. #17
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: How can you return the top 10 ascending text?

    Thanks for the reply.

    Glad i could help.

+ 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. [SOLVED] How to put non-repeating text in ascending order
    By augustus88 in forum Excel Formulas & Functions
    Replies: 13
    Last Post: 05-06-2014, 07:10 PM
  2. ascending numbers with text
    By mlv77 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 08-21-2012, 01:12 AM
  3. Lookup and return ascending values
    By kborgers in forum Excel General
    Replies: 9
    Last Post: 02-04-2010, 12:49 PM
  4. Replies: 3
    Last Post: 10-23-2008, 04:01 PM
  5. one macro to sort text in ascending and descending order
    By jpruffle in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 07-13-2008, 10:24 PM

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