+ Reply to Thread
Results 1 to 6 of 6

Common denominator

Hybrid View

  1. #1
    Registered User
    Join Date
    07-16-2007
    Posts
    43

    general idea

    You could do it line by line and look at the last line for your final result. By using two more columns, keep track on each line of the earliest possible date and of the latest possible date.

    First line: earliest and latest dates are the ones given for the first person.
    Second line: earliest date is the later of the previous earliest date and the earliest date given for the second person. Latest date is the earlier of the previous latest date and the latest date given for the second person.
    Third line and up: same technique as second line.

    You final range will be in the final line. If the final earliest date is a later date than your final latest date (as is the case in your file), you can conclude that you don't have a range that fits everyone. I would put the conditions in order of importance so that you can go up the list to find a range that fits as many conditions as possible.

    This solution won't let you grade the conditions and come up with an optimal solution other than by that kind of absolute sorting. I don't think you'd be able to do that without some programming. It won't let you have several ranges for each line, either. This only works if you have exactly one range for each line or condition or person attending the meeting (to go back to your initial illustration).

    I added the columns in your example workbook.

    If you ever have to deal with several ranges for each condition, you might have to consider programming, or be brutal:
    1) transpose your format so that you have one condition per column
    2) assign a row to each possible date.
    3) For each column, put a 0 in each date that fits the condition and a 1 in each date that doesn't. I'm not sure how to make a formula do it automatically for more than one range, so at this point, you'd have to actually manually type in the 0s and 1s.
    3) sum for each date: dates that fit all conditions will have a sum of 0.

    I can set it up for you in your example workbook, but I won't for now: I'd rather not spend the time on it if you don't need it. If you do need it, just ask.

    Brigitte
    Attached Files Attached Files
    Last edited by Brigitte_P; 05-05-2008 at 03:25 PM.

  2. #2
    Registered User
    Join Date
    05-02-2008
    Posts
    4

    Revised example

    Thanks Brigitte_P. I took your sheet and made some tweaks to it I change the max and min formulas so they had absolute references to Scenario 1 Type 1, and also included if statements, so they could start and stop and the right place. Maybe a vlookup would be better? What do you think? Is it logical? Also, yes, I do have several ranges for each Product. There can be anything from 2 to 10 or more. So for example, there are be 5 of Product 1, Scenario 1, Type 1, 1 or 2 Product 1 Scenario 1, Type 2, and only 1 for each Scenario 3 Type 1, Scenario 3 Type 2, etc.

    As you can see, this is a bit complex to handle, and I agree, programming, is ultimately the way to go. Unfortunately, I don't know how to program at all, and it takes me hours to deal with 500 lines or more of information. I usually end up using filters so I can atleast manage the sorts, and do the calculations manually.

    I would love to see the transposed version as you mentioned. My only concern is that these reports can be quite large, and I'm wondering if it can get a bit messy.

    thanks again,
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    07-16-2007
    Posts
    43
    I've put a basic example of the transposed idea in Sheet 2 of your workbook. Like I said before, it's rather brutal. The columns "Number of Conditions Not Met" tell you how many conditions were not met. It's then up to you to determine which solution is good enough by picking one where all the most important conditions are met. A good start would be to use automatic filters to filter out any row that doesn't have a 0 for the first condition of a product.

    The change you made to the formula I gave you compares each range only to the first one: you completely lose any ability to determine how many of the other conditions share a common range between themselves and the first condition. All you're doing is determining, for each condition, a range that is common with the first one. You'd still have to compare those ranges to each other to satisfy as many conditions as possible.

    I have modified the formula to ensure that the min date is smaller than the max date or to display a message otherwise. This will make sure that any actual range that comes out is a possible range AND that if fits all previous conditions, including the first one.

    Brigitte
    Attached Files Attached Files
    Last edited by Brigitte_P; 05-08-2008 at 12:55 PM.

+ 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