+ Reply to Thread
Results 1 to 23 of 23

Top Ten list based on an certain criteria.

  1. #1
    Registered User
    Join Date
    04-09-2013
    Location
    High Wycombe
    MS-Off Ver
    Excel 2010
    Posts
    21

    Top Ten list based on an certain criteria.

    Hello Excel Forum Saviours.

    I am having a little bit of trouble creating a dynamic list in excel.

    I am looking to create a top ten client list for an overview page. The forumla I have managed to put together so far is

    =Large(IF('2014 Data'!L:L,E3,'2014 Data'!$S:$S,1)) - This currently returns the error of too many arguements.

    Where L:L is the name of the Regional Manager which is confirmed by 'E3'. $S:$S is the revnue that is brought in.

    I am trying to create a table that displays the top ten clients for each Regional Manager.

    Any ideas?

    Cheers

    Tom

  2. #2
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Top Ten list based on an certain criteria.

    Hi Tom.

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    ARRAY formula. As a suggestion don't use whole columns reference. Your sheet will be too slow.

    -- Array(CSE) { }, formulae are confirmed with Control+Shift+Enter.
    Not just Enter.
    Regards

    Fotis.

    -This is my Greek whisper to Europe.

    --Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

    Advanced Excel Techniques: http://excelxor.com/

    --KISS(Keep it simple Stupid)

    --Bring them back.

    ---See about Acropolis of Athens.

    --Visit Greece.

  3. #3
    Forum Expert
    Join Date
    04-22-2013
    Location
    .
    MS-Off Ver
    .
    Posts
    4,418

    Re: Top Ten list based on an certain criteria.

    Hi,

    The IF statement has the following syntax:
    =IF(CONDITION,VALUE IF TRUE,VALUE IF FALSE)
    so you need something like =IF(A1=B1,1,0)

    In your statement you have 4 terms within the brackets which is what is causing the problem. I'm guessing that you want:
    =LARGE(IF('2014Data1'!L:L=E$3,'2014 Data'!$S:$S),ROW(A1)) and drag down

    Also these are array formulas, as mentioned by Fotis so needs to be confirmed with ctrl+shift+enter.

    That would give you the top ten revenue values I think, you don't mention where the client names are. It would be very helpful if you could upload a workbook with some example data (click go advanced and then attachments).
    Last edited by ragulduy; 10-31-2013 at 07:44 AM.

  4. #4
    Registered User
    Join Date
    04-09-2013
    Location
    High Wycombe
    MS-Off Ver
    Excel 2010
    Posts
    21

    Re: Top Ten list based on an certain criteria.

    Hi Guys,

    Thank you very much for your responses so far... I am currently working through a tutorial on Array formulas to get up to speed.

    Yudlugar - I tried copying in your formula however it brought up a box similar to save as menu but titled Update Values: 2014Data1.

    Any ideas what this is?

    Unfortunately I would get in a lot of trouble if I uploaded the source table as it contains sensitive information, however from the reasearch I have done, once I have the top ten sorted by regional manager I will be able to use an Index and Match forumla to populate the client name field in the top ten table?

    Kind Regards,

    Tom

  5. #5
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Top Ten list based on an certain criteria.

    Quote Originally Posted by Clark85 View Post
    Hi Guys,

    Thank you very much for your responses so far... I will be able to use an Index and Match forumla to populate the client name field in the top ten table?

    Kind Regards,

    Tom
    Don't be so sure for this.. If 2 managers have the same amount..?

    If you want to upload a sample (not the original)worksheet, then all will be easier.

  6. #6
    Forum Expert
    Join Date
    04-22-2013
    Location
    .
    MS-Off Ver
    .
    Posts
    4,418

    Re: Top Ten list based on an certain criteria.

    Sorry I put "2014Data1" when it should have been "2014 Data".

    Replace sensitive data with dummy names/values. Just include enough lines that we can see how the data is set out.

  7. #7
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.93.1 for Mac MS 365
    Posts
    8,657

    Re: Top Ten list based on an certain criteria.

    I know you will get some pretty good ideas from the contributors to this forum, this is a simple couple step process I'd likely use to accomplish the same thing (FWIW).
    Attached Files Attached Files
    Make contributors happy, click on the "* Add Reputation" as a way to say thank you.
    Sam Capricci

  8. #8
    Registered User
    Join Date
    04-09-2013
    Location
    High Wycombe
    MS-Off Ver
    Excel 2010
    Posts
    21

    Re: Top Ten list based on an certain criteria.

    I have created a very basic sample file, but should be able to transfer the forumla to my main spread sheet,

    Once again thanks for all your help guys.

    Tom
    Attached Files Attached Files

  9. #9
    Forum Expert
    Join Date
    04-22-2013
    Location
    .
    MS-Off Ver
    .
    Posts
    4,418

    Re: Top Ten list based on an certain criteria.

    Please Login or Register  to view this content.
    In E5 and copy down, it's an array formula so confirm with ctrl+shift+enter. Note , if you don't want duplicates you can get rid of the if count if bit

  10. #10
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Top Ten list based on an certain criteria.

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Both ARRAY formulas.

    -- Array(CSE) { }, formulae are confirmed with Control+Shift+Enter.
    Not just Enter.
    Attached Files Attached Files

  11. #11
    Forum Expert
    Join Date
    04-22-2013
    Location
    .
    MS-Off Ver
    .
    Posts
    4,418

    Re: Top Ten list based on an certain criteria.

    @Fotis, I like that, very neat. but why not replace ROW($C$2:$C$30)-ROW($C$2)+1 with ROW($C$1:$C$29)?

    Also, I think we have a problem with both formulas. If there is a duplicate value for a person not named in E3 then it would still affect the formula. So I think:

    =INDEX($A$2:$A$30,SMALL(IF($C$2:$C$30=F5,IF($B$2:$B$30=$E$3,ROW(E$1:E$29))),COUNTIF(F$5:F5,F5)))

  12. #12
    Registered User
    Join Date
    04-09-2013
    Location
    High Wycombe
    MS-Off Ver
    Excel 2010
    Posts
    21

    Re: Top Ten list based on an certain criteria.

    Fostis and Yudlugar both absolute heros.

    Fostis, one last little problem I am facing.

    When copying the array in for the other two regional managers it is returning the top value for everyone with Row (A1) in every cell. As this is an array formula I can not change any of the individual cells... is there anything I am not doing to complete this?

    Kind Regards,

    Tom

  13. #13
    Forum Expert
    Join Date
    04-22-2013
    Location
    .
    MS-Off Ver
    .
    Posts
    4,418

    Re: Top Ten list based on an certain criteria.

    See attachmentsample.xlsx

    I changed Fotis' formula as suggested in previous post.

  14. #14
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Top Ten list based on an certain criteria.

    @ yudlugar

    @Fotis, I like that, very neat. but why not replace ROW($C$2:$C$30)-ROW($C$2)+1 with ROW($C$1:$C$29)?
    No reason at all! I just use it! I'll take a look to your other point a little later..!

    @ Tom.

    Click on F5>>Copy. Go to H5>>Paste>>Go to formula bar. Change The E3 of the formula to G3. Use Ctrl+Shift+Enter to confirm the formula. Copy down.

  15. #15
    Registered User
    Join Date
    04-09-2013
    Location
    High Wycombe
    MS-Off Ver
    Excel 2010
    Posts
    21

    Re: Top Ten list based on an certain criteria.

    Thanks again guys, I have finally got it working for my spread sheet.

    One quick question, dont know if it will work.

    Some clients have 2 or 3 separate entries. Is there a way so that I could sum these so they only appear as one entry in the list.

    Kind Regards,

    Tom

  16. #16
    Forum Expert
    Join Date
    04-22-2013
    Location
    .
    MS-Off Ver
    .
    Posts
    4,418

    Re: Top Ten list based on an certain criteria.

    That's a bit beyond me!
    I think I've managed something that works...
    for F5:
    =LARGE(IF(B$2:B$26=E$3,SUMIF(A$2:A$26,"="&A$2:A$26,C$2:C$26)),ROW(A1)+SUM(IF(COUNTIF(A$2:A$26,"="&$E$4:E4)-1>0,COUNTIF(A$2:A$26,"="&$E$4:E4)-1)))
    For E5:
    =INDEX($A$2:$A$26,SMALL(IF(SUMIF(A$2:A$26,"="&A$2:A$26,C$2:C$26)=F5,ROW($C$2:$C$26)-ROW($C$2)+1),COUNTIF(F$5:F5,F5)))
    Both array formulas.

  17. #17
    Registered User
    Join Date
    04-09-2013
    Location
    High Wycombe
    MS-Off Ver
    Excel 2010
    Posts
    21

    Re: Top Ten list based on an certain criteria.

    Sorry me again....

    The formula is also returning the 1st alphabetic client for the revenue value in the corresponding place in the list not taking into account the regional manager.

    Any ideas?

  18. #18
    Forum Expert
    Join Date
    04-22-2013
    Location
    .
    MS-Off Ver
    .
    Posts
    4,418

    Re: Top Ten list based on an certain criteria.

    Afraid not. I can't think how to get the regional manager clause to work within the sumif statement.

  19. #19
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Top Ten list based on an certain criteria.

    I am not able to get the new goal at all. Perhaps if i had an example sheet...

  20. #20
    Forum Expert
    Join Date
    04-22-2013
    Location
    .
    MS-Off Ver
    .
    Posts
    4,418

    Re: Top Ten list based on an certain criteria.

    sample.xlsx@Fotis:

    have a look at the attachment, I've got it to work providing the clients and managers are not mixed. If more than one manager has the same client it adds the total between them.

    Could you maybe see if =SUMIFS will work where I use sumif to get the client, I only have 2003 and can't seem to work it out with sumproduct.

    For what it's worth, I'm assuming it would be:
    =LARGE(IF($B$2:$B$26=E$3,SUMIFS($A$2:$A$26,"="&$A$2:$A$26,$B$2:$B$26,"="&E$3,$C$2:$C$26)),ROW(A1)+SUM(IF(COUNTIF($A$2:$A$26,"="&$E$4:$E4)-1>0,COUNTIF($A$2:$A$26,"="&$E$4:$E4)-1)))
    in F5 and
    =INDEX($A$2:$A$26,SMALL(IF(SUMIFS($A$2:$A$26,"="&$A$2:$A$26,$B$2:$B$26,"="&E$3,$C$2:$C$26)=F5,ROW($C$2:$C$26)-ROW($C$2)+1),COUNTIF(F$5:F5,F5)))
    in E5 but I never worked with sumifs and not sure on if it is valid.

  21. #21
    Registered User
    Join Date
    04-09-2013
    Location
    High Wycombe
    MS-Off Ver
    Excel 2010
    Posts
    21

    Re: Top Ten list based on an certain criteria.

    Hi guys,

    Really appreciate your continued support.

    I have attached a full on example spread sheet so that there is no info missing.

    The 2014 Data tab is the updateable data and the Top Clients Tab is where I would like to populate the list.

    The Regional Managers are Coloumn I on 2014 data, with the Revnue being (M) and the Client names are in (A).

    Some of the bigger clients are repeated as they have had to be split in to two teams due to their size. If possible I would like to combine these, though that may be impossible.

    Thanks again,

    Tom
    Attached Files Attached Files

  22. #22
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Top Ten list based on an certain criteria.

    Unfortunately i have no more time for tonight. I'll see it tomorrow morning but a quick modification(syntax of sumifs) gives the result of 1076 in F5.

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Can you pls check if this is correct?

  23. #23
    Forum Expert
    Join Date
    04-22-2013
    Location
    .
    MS-Off Ver
    .
    Posts
    4,418

    Re: Top Ten list based on an certain criteria.

    Yeah 1076 was what I wanted, Thanks!

    So Clark85, I think that the formulas you need are:
    F5 (to find number): =LARGE(IF($B$2:$B$26=E$3,SUMIFS($C$2:$C$26,$A$2:$A$26,"="&$A$2:$A$26,$B$2:$B$26,"="E$3)),ROW(A1)+SUM(IF(COUNTIF($A$2:$A$26,"="&$E$4:$E4)-1>0,COUNTIF($A$2:$A$26,"="&$E$4:$E4)-1)))

    E5 (to find Client name): =INDEX($A$2:$A$26,SMALL(IF(SUMIFS($C$2:$C$26,$A$2:$A$26,"="&$A$2:$A$26,$B$2:$B$26,"="E$3)=F5,ROW($C$2:$C$26)-ROW($C$2)+1),COUNTIF(F$5:F5,F5)))

+ 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. Filter List Based On Certain Criteria
    By Scott_88 in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 12-17-2012, 08:49 AM
  2. [SOLVED] Create a separate list based on criteria in another list.
    By dpitts21 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 12-13-2012, 07:09 PM
  3. Return last row in a list, based on criteria
    By Test123Test in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-08-2012, 05:14 PM
  4. COUNTIF help based one two criteria, one being a list
    By ride_op in forum Excel - New Users/Basics
    Replies: 2
    Last Post: 12-06-2010, 09:24 PM
  5. [SOLVED] add to a cell on a list based on two criteria
    By gabrielinlompoc in forum Excel - New Users/Basics
    Replies: 0
    Last Post: 02-09-2006, 06:10 PM

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