+ Reply to Thread
Results 1 to 12 of 12

What's the formula for seeing where mass schedules overlap?

  1. #1
    Registered User
    Join Date
    09-13-2011
    Location
    Los Angeles, California
    MS-Off Ver
    Excel 2003
    Posts
    56

    What's the formula for seeing where mass schedules overlap?

    Here's what I'm looking to do. Here's the example. Say there is a gameshow or something, and you've just won this prize. There are 50 different banks that, over a 90 day period, will each give you one-thousand dollars on a random 60 of those 90 days. Not all 90 days, but 60. And each of these banks has a different schedule of the 60 days they could give you the thousand out of the 90. The problem is that you can only take in a maximum of one-thousand a day. You can't get a thousand from each of the fifty banks. You can only get one thousand a day. And before the 90 day window starts, you have to pick only two banks that you're going to get your money from.

    Now, if you pick two banks where their schedule of 60 days out of 90 to give you a thousand dollars are exactly the same, where their money-giveaway days are the same 60 days, since you can only take one-thousand a day, you're only going to get sixty thousand. But if you can figure out which two banks out of the 50 have the least in-common schedules, or in other words, have the most money-giveaway days that are different from one another, you might be able to get close to 90 thousand.

    So if I copy 50 different schedules of "giveaway days" into excel, how do I figure out which ones have the most different giveaway dates, the most dates that aren't the same? And not just the most two, but I want to compare each of the 50 to the other 49, and of all those combinations rank the schedules from most in common, most "shared-dates," to least amount of shared dates between two given teams. In practice there won't really 50 schedules, closer to 25, so as long as there's a formula it should be pretty manageable.

    Also of note is that I wont be manually typing in these schedules, i have to copy them from a website and paste them in, and they paste with noise. In between the dates of each schedule, in the same column, alternating lines or 2 of 3 lines, is going to be other information that they have on their schedules. I need a way for excel to either ignore this or delete the not pertinent lines.

    So that's what I need help on. Also keep in mind i can't look at files you upload because my excel is too old to read new excel files, so please explain here in the forum. It's also somewhat urgent because I need to get my project done in the next week, and the work comes in after I figure out the technical stuff. So if you can help please do I would really appreciate it.

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

    Re: What's the formula for seeing where mass schedules overlap?

    So given 50 sets, each containing 60 elements in the range 1..90, find the pair whose union has the most members. That requires unioning every pair of sets, which is 2450 combinations to evaluate.

    I think that's non-trivial.
    Entia non sunt multiplicanda sine necessitate

  3. #3
    Registered User
    Join Date
    09-13-2011
    Location
    Los Angeles, California
    MS-Off Ver
    Excel 2003
    Posts
    56

    Re: What's the formula for seeing where mass schedules overlap?

    Quote Originally Posted by shg View Post
    So given 50 sets, each containing 60 elements in the range 1..90, find the pair whose union has the most members. That requires unioning every pair of sets, which is 2450 combinations to evaluate.

    I think that's non-trivial.
    Well in practice it will be 25 sets, not 50. But isnt the point with excel, if you can do it once you can do it a thousand times? Just copy all 25 schedules on one page, and put in the formula "compare all to each other," and that should do it after someone tells me how to get rid of the noise in between. I just need the formula to do this, and how to get rid of the noise that gets copied in too.

    So is there a way to do this shg? Or anyone else? Or are you saying its impossible?
    Last edited by Excelatexcel; 09-16-2011 at 07:10 PM.

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

    Re: What's the formula for seeing where mass schedules overlap?

    Here it is for 7 banks and 10 days:
    Please Login or Register  to view this content.
    The formula in O3 and copied right and down is

    =SUMPRODUCT(--(INDEX(tbl, ROWS($O$3:O3), 0) + INDEX(tbl, COLUMNS($O$3:O3), 0) > 0))

    tbl refers to C3:L9

    As you can see, a few combinations cover 9 of the 10 days.
    Last edited by shg; 09-17-2011 at 12:56 AM.

  5. #5
    Registered User
    Join Date
    09-13-2011
    Location
    Los Angeles, California
    MS-Off Ver
    Excel 2003
    Posts
    56

    Re: What's the formula for seeing where mass schedules overlap?

    Thanks SHG. A few questions. tbl refers to c3:l9, what does you mean by that? I have to make a table?

    Also what about the noise that gets copied in.

    For example in this excel dummy sheet. Also the schedule gets copied in vertically.

    I uploaded the dummy sheet, with just three bank schedules. Each schedule in reality is a schedule for a different hockey team, but pretend it's for the banks. As you can see it's not just dates getting copied in, there is other information. How do I just isolate the dates? How would you do it using these exact schedules on the dummy sheets? My project is actually sports related so it's going to be just like this.
    Attached Files Attached Files

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

    Re: What's the formula for seeing where mass schedules overlap?

    tbl refers to c3:l9, what does you mean by that?
    See http://www.contextures.com/xlnames01.html

  7. #7
    Registered User
    Join Date
    09-13-2011
    Location
    Los Angeles, California
    MS-Off Ver
    Excel 2003
    Posts
    56

    Re: What's the formula for seeing where mass schedules overlap?

    What about all the noise that gets copied in and all of that? I cant create a range or do anything if in between every line of data there is still random information that gets in the way.

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

    Re: What's the formula for seeing where mass schedules overlap?

    I'm going to leave the data prep part to someone else.

  9. #9
    Registered User
    Join Date
    09-13-2011
    Location
    Los Angeles, California
    MS-Off Ver
    Excel 2003
    Posts
    56

    Re: What's the formula for seeing where mass schedules overlap?

    Okay well thank you for your help. You did do it horizontally though, which isn't data prep, and my data comes in vertically. Is this an easy fix? Can I still do it the way you did or do I have to do it differently?

    edit, I figured out how to prep the data! With Marvin's help I mean I took what he told me in the other thread and applied it to this. I have the data prepped! New dummy sheet coming. Shg if you could input the formula needed yourself or someone else, and upload it here the way Marvin uploads dummy sheets so I can read them with old excel, then I wouldnt even have to spend the next couple days trying to learn a complicated formula. I wouldnt even have to know how to do it.

    I have uploaded the clear data. It's just the dates now. It does still have the day, like "FRI DEC 16, 2011" and the dates are written like that, DEC 16, not 12/16, but that's the way it is. It's clean now. I've included three schedules prepped here, in practice I would do much more, but if you could take this sheet I've uploaded and input the formula to do it, maybe with a quick explanation here of what i need to do to extrapolate it to more schedules, I think that's all it would take.
    Attached Files Attached Files
    Last edited by Excelatexcel; 09-17-2011 at 01:51 AM.

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

    Re: What's the formula for seeing where mass schedules overlap?

    Shg if you could input the formula needed yourself or someone else, and upload it ..., then I wouldnt even have to spend the next couple days trying to learn a complicated formula.
    That's kind of the point of the forum, though, especially if you want to realize your eponym.

    People who do your work for you are called 'paid consultants,' not 'helpers.'

  11. #11
    Registered User
    Join Date
    09-13-2011
    Location
    Los Angeles, California
    MS-Off Ver
    Excel 2003
    Posts
    56

    Re: What's the formula for seeing where mass schedules overlap?

    I didnt mean do my sheet for me, I meant if you know the one formula i need, and I dont, just put it in, once, and then I can copy it everywhere i need it. Or you could explain how to do it here. I figured inputting one formula would be easier for someone than explaining everything. So far no one has helped with this so Im trying to make it as easy as possible for people to help. In fact all I needed to do to prep the data was sort it a certain way and delete, it would have been really simple for someone to tell me that, I asked many times, all you had to say was to sort it by a certain column, but no one would even tell me that much, and I had to take what Marvin told me in the other thread and experiment with it on this.

    I dont want you to do my work for me, I just want some help figuring it out. Where Im coming from is, if no one is even willing to answer a simple question about data prep, who is going to take the time to explain the formula i need? That's why I thought if I gave you the idea to just enter it yourself very quickly, without having to explain anything to me, maybe there was a better chance I'd get help with this.

  12. #12
    Registered User
    Join Date
    09-13-2011
    Location
    Los Angeles, California
    MS-Off Ver
    Excel 2003
    Posts
    56

    Re: What's the formula for seeing where mass schedules overlap?

    just so everyone knows, I did attach a dummy sheet late to this. I do still need help with it. My project is due friday so help would be very appreciated. The dummy sheet that shows how the schedules will look should really be helpful and make it easier to help me I hope. Thanks for the time and effort!

+ 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