+ Reply to Thread
Results 1 to 12 of 12

Rank lowest to highest with duplicate values

Hybrid View

  1. #1
    Registered User
    Join Date
    10-25-2017
    Location
    United States
    MS-Off Ver
    2019
    Posts
    63

    Rank lowest to highest with duplicate values

    I have a spreadsheet of 10 employees (column A) with a data validation list of products (column b). I created two different formulas in columns C & D to extract all of the digits from the product names in column A in attempt to setup a rank formula from lowest to highest $ amount. The problem is employees can have two different products or the same, but the formulas view them the same (ie $500-$20 & $500-$40 - formula views them as 500). I am searching for a rank formula solution that can differentiate products that have the same dollar amounts.

    Employee	Products	    Formula 1	  Formula 2	 Rank on formula 1	  Rank on formula 2
    Employee A   Feet $500-$40	      500	    500-40	       1	                  3
    Employee C   Feet $500-$40	      500	    500-40	       1	                  3
    Employee C   Pontiac $500-$20	      500	    500-20	       1	                  2
    Employee D   USA Feet $2,000-100%    2000	    2000-100	       2	                  1
    Employee E   USA Feet $2,000-100%    2000	    2000-100	       2	                  1
    Employee F   Pontiac $500-$20	      500	    500-20	       1	                  2
    Employee G   Pontiac $500-$20	      500	    500-20	       1	                  2
    Employee H   Feet $500-$40	      500	    500-40	       1	                  3
    Desired Result:
    Employee	Products	             Rank
    Employee A	Feet $500-$40	              2
    Employee B	Feet $500-$40	              2
    Employee C	Pontiac $500-$20	      1
    Employee D	USA Feet $2,000-100%	      3
    Employee E	USA Feet $2,000-100%	      3
    Employee F	Pontiac $500-$20	      1 
    Employee G	Pontiac $500-$20	      1
    Employee H	Feet $500-$40	              2
    Attached Files Attached Files
    Last edited by Stuepef; 04-04-2018 at 09:38 PM.

  2. #2
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2404
    Posts
    13,407

    Re: Rank lowest to highest with duplicate values

    Does this do what you want?

    Formula: copy to clipboard
    =RANK(B2,$B$2:$B$9,1)+COUNTIF($B$2:B2,B2)-1
    Dave

  3. #3
    Registered User
    Join Date
    10-25-2017
    Location
    United States
    MS-Off Ver
    2019
    Posts
    63

    Re: Rank lowest to highest with duplicate values

    I probably should have been more clear in the original post, but yes the formula you supplied works great with how I laid out the information. All of the information in Column A can be mixed and matched. For instance, if I select the following values with the above formula:
                                                                      Rank      Desired Rank
    USA Emboss. Orange $4,000-100%                                       5                     5
    Orange $3,000-70% Treat ACE Free                                     4                     3
    USA Emboss. Orange $3,000-80%                                        4                     4
    Feet $500-$40                                                        2                     2
    Pontiac $500-$20                                                     2                     1

  4. #4
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2404
    Posts
    13,407

    Re: Rank lowest to highest with duplicate values

    Try
    Formula: copy to clipboard
    =RANK(B2,$B$2:$B$9,0)+COUNTIF(B2:$B$9,B2)-1
    Last edited by FlameRetired; 04-04-2018 at 06:46 PM.

  5. #5
    Registered User
    Join Date
    10-25-2017
    Location
    United States
    MS-Off Ver
    2019
    Posts
    63

    Re: Rank lowest to highest with duplicate values

    I edited my OP to hopefully provide more detail of the issues I am running into with ranking the products.

  6. #6
    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. 2405 (Windows 11 23H2 64-bit)
    Posts
    81,432

    Re: Rank lowest to highest with duplicate values

    Quote Originally Posted by Stuepef View Post
    I edited my OP to hopefully provide more detail of the issues I am running into with ranking the products.
    Please don't do this again, as mentioned in post #6: instead, add extra or changed detail to a new post in the thread. There are about 15 edits to the opening post!!!
    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.

  7. #7
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2404
    Posts
    13,407

    Re: Rank lowest to highest with duplicate values

    Would you include the expected results also and an explanation of the logic behind the "why" those are the results.

    Additionally ... as a courtesy ... please don't edit posts after there have already been replies. It 'messes' with the thought flow of the thread and becomes difficult to know how responses relate to the thread.

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

    Re: Rank lowest to highest with duplicate values

    C is ahelper column
    In C2 then drag down.

    =MID($B2,FIND("$",$B2)+1,FIND("-",$B2)-FIND("$",$B2)-1)+SUBSTITUTE(RIGHT($B2,LEN($B2)-FIND("-",$B2)),"$","")*10^-3

    In F2 then drag down.

    =IF(C2="","",SUMPRODUCT(($C$2:$C$9<C2)/COUNTIF($C$2:$C$9,$C$2:$C$9))+1)
    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.

  9. #9
    Forum Expert shukla.ankur281190's Avatar
    Join Date
    05-17-2014
    Location
    Lucknow, India
    MS-Off Ver
    Office 365
    Posts
    3,937

    Re: Rank lowest to highest with duplicate values

    Or in your attachment just change formula.

    D2
    Formula: copy to clipboard
    =SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(MID(B2,MIN(FIND({0,1,2,3,4,5,6,7,8,9},B2&"0123456789")),FIND(" ",B2&" ",MIN(FIND({0,1,2,3,4,5,6,7,8,9},B2&"0123456789")))-MIN(FIND({0,1,2,3,4,5,6,7,8,9},B2&"0123456789"))),"$",""),"%",""),",",""),"-",".")+0
    If I helped, Don't forget to add reputation (click on the little star ★ at bottom of this post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)

  10. #10
    Registered User
    Join Date
    10-25-2017
    Location
    United States
    MS-Off Ver
    2019
    Posts
    63

    Re: Rank lowest to highest with duplicate values

    My apologies for the edits. shukla.ankur281190 - this works really well with the data I provided, I have a list that accompanies that, but I didnt include it in the OP because it looked too daunting. Can this information be incorporated into your logic:
    LazyMaster Blue $300
    LazyMaster Blue $500
    LazyMaster Blue $750
    LazyMaster Blue $1,000
    LazyMaster Phone $2,300
    LazyMaster Phone $2,700
    LazyMaster USA Blue $1,500
    LazyMaster USA Blue $2,200
    LazyMaster USA Emboss. Yellow $2,700
    LazyMaster USA Emboss. Yellow $3,600
    LazyMaster USA Yellow $3,675
    LazyMaster USA Emboss. Yellow $4,500
    LazyMaster USA Emboss. Orange $5,200
    LazyMaster USA Emboss. Orange $6,650
    CoolValue Blue $1,000
    CoolValue Yellow $2,300
    CoolValue USA Yellow $3,600
    CoolValue USA Orange $5,200
    CoolValue USA Orange $6,650
    Made Value Blue $1,000
    Made Value Yellow $2,300
    Made Value USA Yellow $3,600
    Made Value USA Orange $5,200
    Made Value USA Orange $6,650

  11. #11
    Registered User
    Join Date
    03-07-2015
    Location
    Scottsdale, AZ
    MS-Off Ver
    Office 365
    Posts
    13

    Re: Rank lowest to highest with duplicate values

    The other folks are giving you good stuff. I gave you something that you can replicate on your own. By adding a few columns.

  12. #12
    Registered User
    Join Date
    10-25-2017
    Location
    United States
    MS-Off Ver
    2019
    Posts
    63
    Quote Originally Posted by Wrathmaul View Post
    The other folks are giving you good stuff. I gave you something that you can replicate on your own. By adding a few columns.
    I don’t see where you commented on this post?

+ 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] [Help] Rank From Lowest to highest
    By gentle.diether in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-27-2015, 08:21 AM
  2. [SOLVED] Rank Data from Highest to lowest using a macro
    By tejboyd in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 08-28-2015, 07:20 AM
  3. Rank from highest to lowest
    By mastertonn in forum Excel General
    Replies: 7
    Last Post: 07-31-2014, 12:57 PM
  4. [SOLVED] In need of a formula to rank highest to lowest
    By ellie2014 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 07-30-2014, 12:48 AM
  5. [SOLVED] Need a formula to rank highest to lowest values numerically
    By matt1020 in forum Excel General
    Replies: 3
    Last Post: 12-09-2012, 09:38 PM
  6. Excel 2007 : Rank cells by highest to lowest???
    By tvr1226 in forum Excel General
    Replies: 3
    Last Post: 11-29-2011, 02:59 AM
  7. Rank where lowest value is highest rank
    By mile3024 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 12-09-2005, 07:00 PM

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