+ Reply to Thread
Results 1 to 8 of 8

Total QUANTITY of most common ITEM of certain CLASS

  1. #1
    Registered User
    Join Date
    05-15-2010
    Location
    Luxembourg
    MS-Off Ver
    Excel 2003
    Posts
    3

    Post Total QUANTITY of most common ITEM of certain CLASS

    Hi,

    i'm a bit stuck with a List in Excel .

    I need the Total QUANTITY of the most common ITEM of a certain CLASS.

    This is an example part i used for testing.

    Please Login or Register  to view this content.
    I can specify the CLASS and need to get the most common ITEM of the chosen CLASS (which would be "banana" in this case) an then sum the different QUANTITY (which should add up to "11")

    I tried with VLookup, Index, Match etc... but i'm at an end ... Gave me lots of headaches already.

    The Excel file is attached and I'm using Excel 2003.

    Any help is appreciated.

    galen
    Attached Files Attached Files
    Last edited by shg; 05-16-2010 at 03:32 PM.

  2. #2
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,602

    Re: Total QUANTITY of most common ITEM of certain CLASS

    Try look here (result is different because I've changed input data but play a little while with it and see does it work )

    Edit: This is solution that sums only ITEM for one CLASS.

    If you need to SUM no matter of CLASS use =SUMIF(D3:D12,D29,C3:C12) in c29
    Attached Files Attached Files
    Last edited by zbor; 05-16-2010 at 04:26 PM.

  3. #3
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,602

    Re: Total QUANTITY of most common ITEM of certain CLASS

    Also, in Excel options -> Formulas turn on Automatic

    Edit: Slightly improved to give ITEM solution if no match (instead of apple in first case).
    Attached Files Attached Files
    Last edited by zbor; 05-16-2010 at 04:29 PM.

  4. #4
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,602

    Re: Total QUANTITY of most common ITEM of certain CLASS


    Sorry, two above solutions doesn't work so I've start working on this one but don't have time to finish it...

    Things to do:

    - Instead of ROW($A$1:$A$5) needs to go to MAX LEN of the word
    - get rid of 3 helper columns
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    05-15-2010
    Location
    Luxembourg
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: Total QUANTITY of most common ITEM of certain CLASS

    I've just put the formulas in my file and I got weird results.
    Half of the values come out right, the other half doesn't.

    Seems that getting most common ITEM of a CLASS does not work right.
    The QUANTITY adds sums fine.

    I'll give it another try tonight.

    Thanks

  6. #6
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,602

    Re: Total QUANTITY of most common ITEM of certain CLASS

    MAybe this.. With aditional column...

    I think I've uploaded wrong workbook last night... Sorry, it was late

    Note: It's and array formula in D29 and you must enter it with ctrl+shift+enter
    Attached Files Attached Files
    Last edited by zbor; 05-17-2010 at 02:09 AM.

  7. #7
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Total QUANTITY of most common ITEM of certain CLASS

    Quote Originally Posted by galen
    I can specify the CLASS and need to get the most common ITEM of the chosen CLASS (which would be "banana" in this case) an then sum the different QUANTITY (which should add up to "11")
    If as implied by your sample file the Quantity is

    a) independent of chosen Class (ie all banana not just banana in Class B)

    b) class is manually determined

    Then, using your original sample file:

    C32:
    =SUMIF($D$3:$D$12;$D32;$C$3:$C$12)
    confirmed with Enter

    D32:
    =INDEX($D$3:$D$12;MODE(IF($E$3:$E$12=$B32;MATCH($D$3:$D$12;$D$3:$D$12;0))))
    confirmed with CTRL + SHIFT + ENTER

    If the quantity is meant to account for class also then use SUMPRODUCT in place of SUMIF (zbor's file illustrates this already).

  8. #8
    Registered User
    Join Date
    05-15-2010
    Location
    Luxembourg
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: Total QUANTITY of most common ITEM of certain CLASS

    for info,
    i'll be on holidays for a week.
    Have a nice weekend.

+ 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