+ Reply to Thread
Results 1 to 5 of 5

Sorting by Index and Matching Formula

  1. #1
    Registered User
    Join Date
    03-05-2009
    Location
    Lester, IA
    MS-Off Ver
    Excel 2003
    Posts
    46

    Sorting by Index and Matching Formula

    I'm attempting to sort a list of containers and their corresponding quantities (A24:B28 in the attached spreadsheet) by using a combination of an index and match formula (cells A31:A35) and a large formula (cells B31:B35) in order to have the container with the largest quantity (summed in cells B24:B28) appear below in cells A31:A35 and the corresponding quantities in cells B24:B28.

    My current index and match formula works fine until I have the same quantities of different containers as I have replicated on the attached spreadsheet. When this is the case, the formula returns only one of the various container types. How do I edit the formula to allow for multiple containers with the same quantities?

    Thank you!
    Attached Files Attached Files
    Last edited by Cleman04; 07-07-2009 at 03:51 PM.

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Sorting by Index and Matching Formula

    tRY IN A31:

    Please Login or Register  to view this content.
    Confirmed with CTRL+SHIFT+ENTER not just ENTER and copy it down.
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Sorting by Index and Matching Formula

    Here's how I would do it.
    In C24 and copied down, I would use the rank function to rank the values in B without repeat using this formula
    Please Login or Register  to view this content.
    Then in A31 (dragged down), I would use this formula to reference the RANK
    Please Login or Register  to view this content.
    The "ROW(A1)" just returns 1,2,.... to match against C24:C28.
    Does this work for you?
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  4. #4
    Registered User
    Join Date
    03-05-2009
    Location
    Lester, IA
    MS-Off Ver
    Excel 2003
    Posts
    46

    Re: Sorting by Index and Matching Formula

    Thank you- works perfectly!!

  5. #5
    Registered User
    Join Date
    03-05-2009
    Location
    Lester, IA
    MS-Off Ver
    Excel 2003
    Posts
    46

    Re: Sorting by Index and Matching Formula

    This works for me also- Thanks for your help!

+ 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