+ Reply to Thread
Results 1 to 14 of 14

Need help returning the number of times 2 events occur simultaneously

  1. #1
    Registered User
    Join Date
    11-19-2012
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    20

    Need help returning the number of times 2 events occur simultaneously

    Hey everyone,

    So im trying to create a 2D Matrix to see how many times 2 unique events occur. For example, I need to create a table which illustrates the number of movies which have a genre of action AND adventure, action AND comedy, etc.

    I have a sheet in excel which has the movies and corresponding associated genres. any help would be greatly appreciated!

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,735

    Re: Need help returning the number of times 2 events occur simultaneously

    Post a sample workbook. Should be fairly straightforward using SUMPRODUCT.

    Pete

  3. #3
    Forum Expert Moo the Dog's Avatar
    Join Date
    09-28-2012
    Location
    Wisconsin
    MS-Off Ver
    Office 365 (PC & Mac)
    Posts
    1,845

    Re: Need help returning the number of times 2 events occur simultaneously

    You can try this:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Where the movie names are in column A2:A7, the first genre is in column B2:B7, and the second genre is in column C2:C7

    - moo

  4. #4
    Registered User
    Join Date
    11-19-2012
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    20

    Re: Need help returning the number of times 2 events occur simultaneously

    The problem is that I have 7 columns of genres and the associate genre 'action' could be in any column (not just column B)

  5. #5
    Registered User
    Join Date
    11-19-2012
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    20

    Re: Need help returning the number of times 2 events occur simultaneously

    bump. Any thoughts? Just to clarify... here is a sample of the workbook:

    sample.PNG

    As you can see, i want to know how many movies are for example, sci-fi & Drama. Any help would be much appreciated! i know there must be an easy way to save me from doing this manually.
    Last edited by dudakia; 11-19-2012 at 06:54 PM.

  6. #6
    Banned User!
    Join Date
    10-14-2006
    Posts
    1,211

    Re: Need help returning the number of times 2 events occur simultaneously

    Post the workbook not the picture

  7. #7
    Registered User
    Join Date
    11-19-2012
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    20

    Re: Need help returning the number of times 2 events occur simultaneously

    please see the attached workbook. Really appreciate the help/guidance!
    Attached Files Attached Files

  8. #8
    Registered User
    Join Date
    11-19-2012
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    20

    Re: Need help returning the number of times 2 events occur simultaneously

    thoughts anyone?

  9. #9
    Registered User
    Join Date
    11-19-2012
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    20

    Re: Need help returning the number of times 2 events occur simultaneously

    bump. really need help with this folks!

  10. #10
    Registered User
    Join Date
    11-19-2012
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    20

    Re: Need help returning the number of times 2 events occur simultaneously

    I tried the following:

    =SUMPRODUCT(--(Table2[[Primary Genre]:[Column7]]="420"),--(Table2[[Primary Genre]:[Column7]]="Adventure"))

    but the result is 0, even though it should be 1...anybody have an ideas of why it is returning the incorrect value?

    Thanks!

  11. #11
    Registered User
    Join Date
    11-19-2012
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    20

    Re: Need help returning the number of times 2 events occur simultaneously

    bumping this in a last attempt to get some help!

  12. #12
    Forum Expert Moo the Dog's Avatar
    Join Date
    09-28-2012
    Location
    Wisconsin
    MS-Off Ver
    Office 365 (PC & Mac)
    Posts
    1,845

    Re: Need help returning the number of times 2 events occur simultaneously

    If I knew enough VBA to get this going, I would love to help. And I can't think of how to create a formula that would return the values needed without it being an enormous mess... sorry.

    - Moo

  13. #13
    Registered User
    Join Date
    11-19-2012
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    20

    Re: Need help returning the number of times 2 events occur simultaneously

    would it be easier if I organize the table so that, for example, the first 4 columns are genres(action, adventure, etc), while columns 4-8 are categories (movies your dad likes, true epics, etc.)?

  14. #14
    Forum Expert Moo the Dog's Avatar
    Join Date
    09-28-2012
    Location
    Wisconsin
    MS-Off Ver
    Office 365 (PC & Mac)
    Posts
    1,845

    Re: Need help returning the number of times 2 events occur simultaneously

    I am thinking this is really a job for VBA. You might try posting this topic over in the Programming/VBA section and see what pops up. Be sure to include your sample file.

    - Moo

+ 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