+ Reply to Thread
Results 1 to 3 of 3

Using INDEX function to get the top 10

  1. #1
    all4excel
    Guest

    Lightbulb Using INDEX function to get the top 10

    I have a database of three columns.
    Col A Col B Col C
    Sr.No. Name of the Store Sales Figures
    1 Walmart $199
    2 Shopmart $299
    3 Toys R Us $1990
    4 The Buyers $1989
    5 Shoppers Stop $2360
    6 Shopper's paradise $199

    Now this is the original data

    I want the data to get sorted based on the sales figure automatically and PROGRAMATICALLY not using the SORT function...

    I am using the formula

    [ = INDEX(B:C,MATCH(LARGE(C:C,ROW()-1),C:C,0),1) ]

    This is working fine however i want to take care of duplicate data values like

    Sr.No. Name of the Store Sales Figures
    1 Walmart $199
    6 Shopper's paradise $199..

    I have seen some code in this wonderful forum which takes care of that..

    Which introduces a miniscule difference by using ^ i.e. raise to soomething..

    Thanx in anticipation

  2. #2
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675
    Yes, you can do it that way but I'd suggest a slightly different approach using a "helper" column to give each store a unique rank and then using that rank as a "key" to produce a sorted table, see attached

    Note: the formula in B13 can simply be copied across and down as necessary
    Attached Files Attached Files

  3. #3
    Forum Contributor
    Join Date
    09-25-2004
    Posts
    269
    If you want to list the largest values in a alphabetical order that account for duplicates then try...

    Assuming your names are in column B and the values are in column C

    Input forumla in cell E2 and copy down.


    Please Login or Register  to view this content.
    The formula is an-array must hold down:

    Ctrl,Shift,Enter


    If you would like a non-array aprroach they try...

    Input formula in cell E2 and copy down.

    Please Login or Register  to view this content.
    Attached Files Attached Files

  4. #4
    all4excel
    Guest

    Smile Thanx for the help DADDYLONGLEGS and vane...

    Thanx for the help DADDYLONGLEGS and vane...
    I have attached the file which i was able to recover...

    Both your codes worked however ur file didnt open...
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    01-10-2008
    Posts
    24
    Hi Daddylonglegs and Vane,

    Using the "Large sort.xls file" as the example, if there were "errors", such as "#Value!" or alpha information in column C, how could the formula be changed to still work?

    Thank you in advance.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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