+ Reply to Thread
Results 1 to 13 of 13

LARGE with IF Statement?

  1. #1
    Registered User
    Join Date
    01-11-2007
    Posts
    6

    LARGE with IF Statement?

    Hi there!

    I need to create a "Top 5" list based on two columns. The example is as attached (the real list is approx 22 000 lines):

    I need to find the top 5 largest quantites (column A) for each flag catagory (column D) and include the part number and description. I have tried a pivot table and had some issues. Also tried a LARGE(IF...) type formula and still no luck. Does anyone have any ideas of what is the best way to do this??? I have a very short timeline and am struggling!

    Thanks!
    Attached Files Attached Files
    Last edited by NBVC; 05-05-2009 at 04:26 PM.

  2. #2
    Registered User
    Join Date
    04-24-2009
    Location
    Strathmiglo, Scotland
    MS-Off Ver
    Excel 2000
    Posts
    10

    Re: LARGE with IF Statement?

    Hi Could you not just try a quick macro to do this for you. Are columns A and D already sorted to matcheach other.

    If so Right click and View Code for Worksheet tab and copy this into it hit save. Go back to your spreadsheet and hit tool/macro/macros/run


    Please Login or Register  to view this content.

    KR
    Last edited by NBVC; 05-01-2009 at 12:00 PM.

  3. #3
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: LARGE with IF Statement?

    bill74,

    Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code. Posting code without them makes your code hard to read and difficult to be copied for testing. Highlight your code and click the # at the top of your post window. For more information about these and other tags, found here
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  4. #4
    Registered User
    Join Date
    04-24-2009
    Location
    Strathmiglo, Scotland
    MS-Off Ver
    Excel 2000
    Posts
    10

    Re: LARGE with IF Statement?

    Sorry, will do so from now on. :-)

    KR

    Bill

  5. #5
    Registered User
    Join Date
    01-11-2007
    Posts
    6

    Re: LARGE with IF Statement?

    I guess I am a bit confused as to what the lines in your macro refer to. I am not great with that aspect of Excel, so apologies for the beginner like questions! Can you provide a bit more detail please?

    Thanks!

  6. #6
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: LARGE with IF Statement?

    Here is a possibility....


    You would have to download and install a free addin called Morefunc.xll from here: http://download.cnet.com/Morefunc/30...-10423159.html to use the EVAL() function that automatically inserts and evaluated the condition from column D
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    01-11-2007
    Posts
    6

    Re: LARGE with IF Statement?

    I unfortunately can't as I am at work and we are blocked from downloading addins.

    Thanks anyways!

  8. #8
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: LARGE with IF Statement?

    Hmm... I wonder...

    That addin allows one to embed the functions into the workbook so others don't need to download...

    Can you check the attached and see if you get results or NAME! errors...

    If you get results, you now have the Morefunc.xll embedded in the workbook....

    but you will need to transfer your original stuff here for you to use the functioins..
    Attached Files Attached Files

  9. #9
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: LARGE with IF Statement?

    Well, i guess i didn't think about it, but if you can't download the addins, you probably can't download the workbook samples from here....

  10. #10
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: LARGE with IF Statement?

    i dont quite get it ,you only have 3 conditions

    <=5 >14 <=14
    if so you can use a large if array with index/match
    Attached Files Attached Files
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  11. #11
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: LARGE with IF Statement?

    Martin,

    As we have learned, hopefully, it is better not to assume to simplistic, I didn't want to assume that there was only those 3 variations and so I based my solution on the fact that they can change on the fly and have indeed as many conditions as there are lines.

  12. #12
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: LARGE with IF Statement?

    well at least it may prompt a little clarification

  13. #13
    Registered User
    Join Date
    01-11-2007
    Posts
    6

    Re: LARGE with IF Statement?

    Thanks everyone!

+ 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