+ Reply to Thread
Results 1 to 8 of 8

Rank Ties On Another Field

  1. #1
    Registered User
    Join Date
    11-04-2010
    Location
    Cardiff
    MS-Off Ver
    Excel 2007
    Posts
    6

    Rank Ties On Another Field

    Hi
    I was hoping you'd be able to help me please.

    I have 2 fields - one with the number of stores each company has, and another the total amount of sales each company has made.
    I'd like to rank the stores purely on the amount of stores they have (simple) but where ties occur I'd like them to be sorted by the volume of sales made.
    Here's an example of my data:
    Stores Sales =Rank() What I'd Like
    11 2400 1 1
    10 995 2 2
    10 248 2 3
    7 315 4 4

    Seven of the companies have the same number of stores (4) all with differing sales volumes.
    If anyone can write a formula that will do this for me I'll be eternally grateful!
    Thanks
    SM
    Last edited by SuperMaths; 03-06-2013 at 12:05 PM.

  2. #2
    Registered User
    Join Date
    11-04-2010
    Location
    Cardiff
    MS-Off Ver
    Excel 2007
    Posts
    6

    Re: Rank Ties On Another Field

    I also meant to say that the Stores column will not necessarily be in descending order!

  3. #3
    Forum Expert Ace_XL's Avatar
    Join Date
    06-04-2012
    Location
    UAE
    MS-Off Ver
    2016
    Posts
    6,074

    Re: Rank Ties On Another Field

    Try

    =RANK(A2,$A$2:$A$5)+SUMPRODUCT(($A$2:$A$5=A2)*(B2<$B$2:$B$5))

    copy down
    Life's a spreadsheet, Excel!
    Say thanks, Click *

  4. #4
    Forum Expert
    Join Date
    06-26-2010
    Location
    Austin, TX
    MS-Off Ver
    Excel 2010
    Posts
    1,673

    Re: Rank Ties On Another Field

    This may be a little tricky. While the stores may not be in ascending order, can we assume that the stores are grouped together (i.e. all of the store 10's are together without other stores between them)?

    Pauley

  5. #5
    Registered User
    Join Date
    11-04-2010
    Location
    Cardiff
    MS-Off Ver
    Excel 2007
    Posts
    6

    Re: Rank Ties On Another Field

    @ACE_XL - that looks like it works a dream! Thanks!

    @Pauley - I probably described it poorly, apologies. Each row represents a company. The first company has 11 stores, and that company made 2,400 sales. The next, separate, company has 10 stores and they made 995 sales. A third company also has 10 stores but they only made 248 sales.
    I'd like the companies ranking 1 to 23 (I have a bigger table) based primarily on the amount of stores they have, but where two or more companies have the same amount of stores, then rank them on the amount of sales made.
    I think ACE_XL's formula works - I still get ties when the same amount of sales are reported also - but I can probably get away with that (unless anyone know's a way round that too?!!)

    Thanks for your help!

  6. #6
    Forum Expert
    Join Date
    06-26-2010
    Location
    Austin, TX
    MS-Off Ver
    Excel 2010
    Posts
    1,673

    Re: Rank Ties On Another Field

    Good solution Ace_XL

    Pauley

  7. #7
    Forum Expert Ace_XL's Avatar
    Join Date
    06-04-2012
    Location
    UAE
    MS-Off Ver
    2016
    Posts
    6,074

    Re: Rank Ties On Another Field

    I still get ties when the same amount of sales are reported also - but I can probably get away with that (unless anyone know's a way round that too?!!)
    What logic would you use to rank one higher than the other?

  8. #8
    Registered User
    Join Date
    11-04-2010
    Location
    Cardiff
    MS-Off Ver
    Excel 2007
    Posts
    6

    Re: Rank Ties On Another Field

    At that level, no logic.
    If the amount of stores were tied and the amount of sales were tied I'd simply want one as 11th (for example) and one 12th.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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