+ Reply to Thread
Results 1 to 9 of 9

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 tried getting some help in the functions forum, but was sent over here since they felt it would best be suited to use VBA.

    Really would appreciate your help. Please see the attached workbook.
    Attached Files Attached Files

  2. #2
    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 woudl appreciate some help with this guys...I've spent hours trying to fig this out using built in functions and unfortunately nothing seems to work.

  3. #3
    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?

  4. #4
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

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

    Why not just autofilter the whole ensemble by columns O:S?
    Entia non sunt multiplicanda sine necessitate

  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

    how would i do that? If i use auto filter, its on a column by column basis which would potentially eliminate rows which have the desired data value (the data value may be in another column).

    Thanks for your help!

  6. #6
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

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

    Your formula in those columns tells whether the genre appears in any of the columns to the left.

  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

    wouldn't it make more sense to use a macro which checks each row to see if "action" and "80's perms" exist, if so add 1 to the appropriate cell in the matrix. I guess I could use the filter method, however, its too manual...i need the solution to be scalable to support 1000s of movies, so Id like a more robust solution to populate the 2D matrix.

    Thanks!

  8. #8
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

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

    See attached.
    Attached Files Attached Files

  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

    thanks shg...this result would return whether or not the category exists in a column; obviously i would need to add the remaining 30 categories . What i need though is to be able to fill out the cells in the 'matrix' worksheet... so i would effectively need to be able to run a macro which would fill in a particular cell with the count of movies which are "action" and 80's perms. So if i were to finish adding the additional countifs for the categories, i would populate a table of zeros and 1s. Then would it make sense to to essentially check if a value in B34 + D34 = 2 then add 1 to the count in the appropriate matrix cell?

    Thanks for your help!

+ 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