+ Reply to Thread
Results 1 to 7 of 7

Ranking with sumproduct without duplicates

  1. #1
    Registered User
    Join Date
    02-22-2013
    Location
    bristol, england
    MS-Off Ver
    Excel 2010
    Posts
    26

    Ranking with sumproduct without duplicates

    D P V

    product sales rank

    aaaa11 63 1
    aaaa11 12 3
    aabb11 22 1
    aabb11 22 1
    aacc11 14 1
    aadd11 66 1
    aaaa11 45 2
    aabb11 22 1

    I have already ranked by product using sumproduct =SUMPRODUCT(--($D$1:$D$43354=D1),--(P1<$P$1:$P$43354))+1
    but it returns duplicates and messes up other formulae i have running. how can i get it to just assign aabb11 to go 1,2,3 i dont care which ones.
    There is a profit% column(S) which i tried to rank if P=P:P but it didnt work.
    Can anyone help?

  2. #2
    Forum Guru benishiryo's Avatar
    Join Date
    03-25-2011
    Location
    Singapore
    MS-Off Ver
    Excel 2013
    Posts
    5,156

    Re: Ranking with sumproduct without duplicates

    hi luke11111. since you don't mind which comes first, try:
    =SUMPRODUCT(($D$1:$D$43354=D1)*($P$1:$P$43354+ROW($P$1:$P$43354)/10000>=P1+ROW(P1)/10000))

    Edit: in an opposite way, this would probably work as well
    =SUMPRODUCT(($D$1:$D$43354=D1)*($P$1:$P$43354-ROW($P$1:$P$43354)/10000>=P1-ROW(P1)/10000))
    Attached Files Attached Files
    Last edited by benishiryo; 02-27-2013 at 09:30 AM.

    Thanks, if you have clicked on the * and added our rep.

    If you're satisfied with the answer, click Thread Tools above your first post, select "Mark your thread as Solved".

    "Contentment is not the fulfillment of what you want, but the realization of what you already have."


    Tips & Tutorials I Compiled | How to Get Quick & Good Answers

  3. #3
    Registered User
    Join Date
    02-22-2013
    Location
    bristol, england
    MS-Off Ver
    Excel 2010
    Posts
    26

    Re: Ranking with sumproduct without duplicates

    Hello and Thank you. Just tried it and it returns #VALUE!
    Not sure why. Thanks anyway.

  4. #4
    Registered User
    Join Date
    02-22-2013
    Location
    bristol, england
    MS-Off Ver
    Excel 2010
    Posts
    26

    Re: Ranking with sumproduct without duplicates

    I cant understand how those formuale work on the sample but when I copy and paste them into the main data,
    one returns a #VALUE! and the other does rank but the numbers are too high. Doesnt seem to be any ranks 1-50
    Any Ideas?
    Thanks again for your time

  5. #5
    Registered User
    Join Date
    02-22-2013
    Location
    bristol, england
    MS-Off Ver
    Excel 2010
    Posts
    26

    Re: Ranking with sumproduct without duplicates

    Thank you so much. Ive just gone through my data and found that a header had got mixed up in it.
    This was messing up all my formulae. Lesson for the future.
    Your formula's work like a charm. Thank you my friend

  6. #6
    Forum Contributor
    Join Date
    09-24-2012
    Location
    York, England
    MS-Off Ver
    Excel 2003/07/10
    Posts
    165

    Re: Ranking with sumproduct without duplicates

    Hello Luke
    You may like to try the Evaluate formula option on the formula group. This is brilliant for finding exactly whereabouts the error is occurring. It might just be a typo, or something thats
    referring to the wrong cell.

    HTH

  7. #7
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Ranking with sumproduct without duplicates

    Maybe like this (a pivot table)
    Attached Files Attached Files
    Notice my main language is not English.

    I appreciate it, if you reply on my solution.

    If you are satisfied with the solution, please mark the question solved.

    You can add reputation by clicking on the star * add reputation.

+ 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