+ Reply to Thread
Results 1 to 4 of 4

Excel 2007 : Counting the number of times a combination appears

  1. #1
    Registered User
    Join Date
    05-14-2012
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    3

    Counting the number of times a combination appears

    Hi all, I really need help. Here's the scenario, I have a list of shops who sells different beverages A,B,C,D,E,F,G,H,I. The number of beverages a shop carries is listed.

    Ie.

    Name of Shop Beverage A Beverage B Beverage C
    Shop 1 3 2 3
    Shop 2 1 1
    Shop 3 3

    Some shops sells just beverage A, some sells A,C,D, some sells G,H,I and so on. I need to find how many shops sells a certain combination of beverages.

    There are 511 possible combinations in total which I have found and listed in another sheet using VBA. I need to find out how many shops carries that particular combination of drinks.

    In the example above, shops that carry

    Beverage A, B, C = 2
    Beverage A, B =0
    Beverage A, C =1
    Beverage B, C = 0


    Please help! thanks!

  2. #2
    Registered User
    Join Date
    05-14-2012
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: Counting the number of times a combination appears

    I have attached the file. Can anyone help?
    Attached Files Attached Files

  3. #3
    Forum Expert
    Join Date
    12-15-2009
    Location
    Chicago, IL
    MS-Off Ver
    Microsoft Office 365
    Posts
    3,177

    Re: Counting the number of times a combination appears

    Attach a smaller sample with what the result is going to look like. The description of your problem doesn't seem clear to me.

  4. #4
    Registered User
    Join Date
    05-14-2012
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: Counting the number of times a combination appears

    Hi, thanks for your response! I've attached another sheet with a shorter list. In the first tab, i have the outlets with (on the right) the number of beer each outlet has.

    What I want to find it on the second sheet 'count', highlighted in yellow. I want to know how many outlets has that particular combination of beers. It does not matter how many bottles of 'Tiger' they have, as long as they have at least 1 they will be included. There are 511 possible combinations in total.

    It does not matter how the output is formatted, as long as i can find out the number of outlets with that particular combination. More outlets may be added in the first sheet so the method can to allow additions.

    I can probably do countifs.. but i'll have to generate the formula for 511 combinations.

    I know this is complicated, I hope this makes more sense now.
    Attached Files Attached Files

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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