+ Reply to Thread
Results 1 to 16 of 16

Ranking based on criteria

  1. #1
    Registered User
    Join Date
    09-04-2020
    Location
    USA
    MS-Off Ver
    2016
    Posts
    25

    Wink Ranking based on criteria

    I need help to calculate ranking on the basis of criteria. Col. A has list of item Col. B has price for each item Col. C categorized each item as "urgent" & "Not Urgent". In col. D there is a date for each item. In col. E, i want to rank all "urgent" item on the basis of there Price and on the basis of the date in col.D which should be less than H2.
    If the item has same price & is "urgent" then same rank should be given and also the ranking should be on continuous basis i.e., something like 1,2,2,3,4,5, and so on.
    Kindly help to derive an excel formula for the same.

    I hope you guys understood. My english is bad its not my first language thanks for the help in advance
    Attached Files Attached Files

  2. #2
    Registered User
    Join Date
    09-04-2020
    Location
    USA
    MS-Off Ver
    2016
    Posts
    25

    Re: Ranking based on criteria

    I am using this formula in E4
    =SUMPRODUCT(--(C4=$C$4:$C$23),--(B4<$B$4:$B$23))+1

    However this takes the account of both "Urgent" & "Non Urgent" and also i am not able to think how bring the date criteria in it.

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

    Re: Ranking based on criteria

    Hello andrei461. Welcome to the forum.

    As far as the "Urgent"/"Non Urgent" ranking goes try array entering this formula in E4 and fill down If you aren’t familiar with array-entered formulas array enter means the formula must be committed from edit mode by simultaneously pressing and holding down Ctrl and Shift while hitting Enter.
    Formula: copy to clipboard
    Please Login or Register  to view this content.



    As for the inclusion of date as criteria for rank I think we will need more information. Please attach another workbook to your next post with the hand typed results of what you expect with that criteria in mind. It might help us to understand better.
    Dave

  4. #4
    Forum Expert wk9128's Avatar
    Join Date
    08-15-2020
    Location
    Australia
    MS-Off Ver
    365 V2403 and WPS V2022
    Posts
    3,416

    Re: Ranking based on criteria

    E4 cell formula , drag down
    HTML Code: 

  5. #5
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,466

    Re: Ranking based on criteria

    Try:

    =IF(AND(C4="Urgent",D4>=$H$2),SUMPRODUCT(--(($D$4:$D$23>=$H$2)*($C$4:$C$23="Urgent")*$B$4:$B$23>=B4)),"")
    Attached Files Attached Files
    Quang PT

  6. #6
    Forum Expert wk9128's Avatar
    Join Date
    08-15-2020
    Location
    Australia
    MS-Off Ver
    365 V2403 and WPS V2022
    Posts
    3,416

    Re: Ranking based on criteria

    Revisit #1 requirement, it must include the date, the practice is the same as you, so your formula is correct

  7. #7
    Registered User
    Join Date
    09-04-2020
    Location
    USA
    MS-Off Ver
    2016
    Posts
    25

    Re: Ranking based on criteria

    Thanks bebo021999 your formula works as i intended with a minor issue. I want to rank the "Urgent" items without skipping the ranking numbers. I have attached the worksheet with Col. E having your formula and deriving the rank. Whereas Col. F having my desired rank.
    I am sure there must be some way to avoid the skipping of numbers in Rank.

    Thanks for help
    Attached Files Attached Files

  8. #8
    Registered User
    Join Date
    09-04-2020
    Location
    USA
    MS-Off Ver
    2016
    Posts
    25

    Re: Ranking based on criteria

    Quote Originally Posted by FlameRetired View Post
    Hello andrei461. Welcome to the forum.

    As far as the "Urgent"/"Non Urgent" ranking goes try array entering this formula in E4 and fill down If you aren’t familiar with array-entered formulas array enter means the formula must be committed from edit mode by simultaneously pressing and holding down Ctrl and Shift while hitting Enter.
    Formula: copy to clipboard
    Please Login or Register  to view this content.



    As for the inclusion of date as criteria for rank I think we will need more information. Please attach another workbook to your next post with the hand typed results of what you expect with that criteria in mind. It might help us to understand better.
    i have attached a sheet for your refernce. its a nice approach for using array entered formula. Ur formula takes into criteria of ranking "Urgent" item on the basis of decreasing price. I want to include a third criteria that will take account of Col. D values and check it with H2. If dates in col. D >= H2 then only i want to rank "Urgent" on the basis of decreasing "Price".

    Thanks for your help
    Attached Files Attached Files

  9. #9
    Forum Expert wk9128's Avatar
    Join Date
    08-15-2020
    Location
    Australia
    MS-Off Ver
    365 V2403 and WPS V2022
    Posts
    3,416

    Re: Ranking based on criteria

    Hi andrei461 , you post at #8 , F7 should be 1 right ? but your result is blank
    F4 cell formula
    HTML Code: 

  10. #10
    Registered User
    Join Date
    09-04-2020
    Location
    USA
    MS-Off Ver
    2016
    Posts
    25

    Re: Ranking based on criteria

    Quote Originally Posted by wk9128 View Post
    Hi andrei461 , you post at #8 , F7 should be 1 right ? but your result is blank
    F4 cell formula
    HTML Code: 
    Thanks wk9128 for your response.
    As i was testing ur formula its doing what i intend but the rank is skipping "1", its starting as 0, 2, 3 and so on also ur formula does not take account of the date criteria. just check the sheet i have attached.

    Thanks for your help

    Note : Col. E has your formula Whereas Col. F has my desired rank
    Attached Files Attached Files
    Last edited by andrei461; 10-02-2020 at 06:25 AM.

  11. #11
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,211

    Re: Ranking based on criteria

    Please try at E4

    =IF((C4="Urgent")*(D4>=H$2)*(D4<H$2+29),SUM(N(FREQUENCY(IF((C$4:C$23="Urgent")*(D$4:D$23>=$H$2)*(D$4:D$23<H$2+29)*(B$4:B$23>B4),B$4:B$23),B$4:B$23)>0))+1,"")


    14 May is more than 15 Apr

    I add D$4:D$23<H$2+29 to check date with in a month
    Attached Files Attached Files
    Last edited by Bo_Ry; 10-02-2020 at 06:44 AM. Reason: Correction

  12. #12
    Registered User
    Join Date
    09-04-2020
    Location
    USA
    MS-Off Ver
    2016
    Posts
    25

    Re: Ranking based on criteria

    Quote Originally Posted by Bo_Ry View Post
    Please try at E4

    =IF((C4="Urgent")*(D4>H$2),MAX(1,SUM(FREQUENCY(IF((C$4:C$23="Urgent")*(D$4:D$23>$H$2)*(B$4:B$23>B4),B$4:B$23),B4))),"")
    Thanks Bo_Ry for your response.

    I tried using your formula but i guess its taking account of the maximum function and thus ranking ranking price of approx same value i.e., 3.5-3.44-3.3 with the same rank.

    The sheet is attached for your reference.

    Thanks for the help
    Attached Files Attached Files

  13. #13
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,211

    Re: Ranking based on criteria

    B8 should be number 3.44 not 3,44

    14 May is more than 15 Apr
    I add D$4:D$23<H$2+29 to check date with in a month

    =IF((C4="Urgent")*(D4>=H$2)*(D4<H$2+29),SUM(N(FREQUENCY(IF((C$4:C$23="Urgent")*(D$4:D$23>=$H$2)*(D$4:D$23<H$2+29)*(B$4:B$23>B4),B$4:B$23),B$4:B$23)>0))+1,"")
    Attached Files Attached Files

  14. #14
    Registered User
    Join Date
    09-04-2020
    Location
    USA
    MS-Off Ver
    2016
    Posts
    25

    Re: Ranking based on criteria

    Quote Originally Posted by Bo_Ry View Post
    B8 should be number 3.44 not 3,44

    14 May is more than 15 Apr
    I add D$4:D$23<H$2+29 to check date with in a month

    =IF((C4="Urgent")*(D4>=H$2)*(D4<H$2+29),SUM(N(FREQUENCY(IF((C$4:C$23="Urgent")*(D$4:D$23>=$H$2)*(D$4:D$23<H$2+29)*(B$4:B$23>B4),B$4:B$23),B$4:B$23)>0))+1,"")
    Damn I am so sorry .. i was fast on replying i should have checked.

    You are a life savor. Your formula is what i was looking for. I am gonna do some trials on the formula with different scenarios and if there is any issue i would come back or else i would change the status of the post to "Solved".

    Thanks everyone for your responses.

  15. #15
    Forum Expert wk9128's Avatar
    Join Date
    08-15-2020
    Location
    Australia
    MS-Off Ver
    365 V2403 and WPS V2022
    Posts
    3,416

    Re: Ranking based on criteria

    I did not consider the problem. The correction is as follows. It has been clearly marked with colors. I feel that your simulated data still has problems. Please see my solution in column G. You try to change the D14 cell ,The date 2020/5/14 change to 2020/3/14. Pls See result
    Attached Files Attached Files

  16. #16
    Registered User
    Join Date
    09-04-2020
    Location
    USA
    MS-Off Ver
    2016
    Posts
    25

    Re: Ranking based on criteria

    Quote Originally Posted by wk9128 View Post
    I did not consider the problem. The correction is as follows. It has been clearly marked with colors. I feel that your simulated data still has problems. Please see my solution in column G. You try to change the D14 cell ,The date 2020/5/14 change to 2020/3/14. Pls See result
    Thanks wk9128, your solution works as charm for me
    You and Bo_Ry has solved my query efficiently.

    Thanks for your responses.

+ 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. Ranking based on subtotal sum and ignoring rows based on criteria
    By Crysaline in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 11-21-2018, 07:23 AM
  2. [SOLVED] Create a table based on top ranking criteria, based on multiple fields.
    By stevensimon10482 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 11-13-2017, 08:49 PM
  3. Ranking Question - Ranking based criteria but having forumla value issues
    By harp1983 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 02-09-2016, 07:03 AM
  4. Ranking Based on Criteria
    By mlbdc2012 in forum Excel Formulas & Functions
    Replies: 35
    Last Post: 02-26-2014, 01:07 PM
  5. Ranking Based on Three Criteria
    By annie82 in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 05-28-2013, 01:21 AM
  6. Excel 2007 : Ranking Based on Three Criteria
    By CRIMEDOG in forum Excel General
    Replies: 4
    Last Post: 02-09-2012, 08:18 PM
  7. Ranking based on certain criteria?
    By Ahmad Adha Ali in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 05-18-2005, 04:51 AM

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