+ Reply to Thread
Results 1 to 3 of 3

Match a date when date ranges sometimes overlap and return multiple results

  1. #1
    Registered User
    Join Date
    07-19-2012
    Location
    Pune, India
    MS-Off Ver
    Excel 2010
    Posts
    4

    Match a date when date ranges sometimes overlap and return multiple results

    Hi Experts,

    I have encountered a deadlock in the excel sheet which is enclosed for your reference.
    I have three sheets
    First one is the calendar view (ENV Calendar) which would reflect/highlight the environment booking details based on my second sheet date range i.e. ENV Data.

    I've fairly achieved the most of my objective except a major one and i.e. when a date is falling in two date ranges how would my calendar reflect that ?
    What i wish to achieve is if I combine those two results as an output like 1-2 or 2-3 or 3-1 i'd go for a conditional formatting creating a separate legend for new outputs but how would i get those ?

    I tried using something like this but this didn't help me

    =INDEX($B$3:$B$6, SMALL(IF(($C$8>=$C$3:$C$6)*($C$8<=$D$3:$D$6), MATCH(ROW($B$3:$B$6), ROW($B$3:$B$6))), ROW(A1)))
    as this would give me outputs in multiple cells and that too depending upon the value given in ROW(A1) at the last of the formula. How could i use this dynamically in a single formula to achieve the desired output as mentioned above?
    Attached Files Attached Files

  2. #2
    Forum Expert RobertMika's Avatar
    Join Date
    06-22-2009
    Location
    Haverhill, UK
    MS-Off Ver
    Excel 2003-13
    Posts
    1,530

    Re: Match a date when date ranges sometimes overlap and return multiple results

    What's the data source/output and where do you need this formula to be placed?
    If you are http://www.excelforum.com/image.php?type=sigpic&userid=125481&dateline=1392355029happy with the results, please add to the contributor's
    reputation by clicking the reputation icon (star icon).




    If you are satisfied with the solution(s) provided, please mark your thread as Solved.
    Select Thread Tools-> Mark thread as Solved.
    To undo, select Thread Tools-> Mark thread as Unsolved.
    http://www.excelaris.co.uk

  3. #3
    Registered User
    Join Date
    07-19-2012
    Location
    Pune, India
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: Match a date when date ranges sometimes overlap and return multiple results

    Robert

    Basically i want my calendar to show multiple environments booked on a given date. I have my formulae places in B15:H20 but it just shows one environment even if the dates are overlapped in two or more date ranges (in sheet END Data).

    E.G If ENV1 is booked from 1-Jan-2013 till 15-Mar-2013 and at the same time ENV 2 is also booked from 10-JAN-2013 till 20-JAN-2013 and ENV 3 is booked from 18-Jan-2013 then i want my formulas to come up with the output 1-2-3 which am unable to do however for two environments i got it working but for 3 or more environments it doesn't work.

    Formula for two environments with output 1-2 or 2-3 or 3-1 is
    INDEX(tblEnv[[#All],[Env]],MATCH(1,(C7>=tblEnv[[#All],[From Date]])*(C7<=tblEnv[[#All],[To Date]]),0))&IF(SUMPRODUCT((C7>=tblEnv[[#All],[From Date]])*(C7<=tblEnv[[#All],[To Date]]))>1,","&INDEX(tblEnv[[#All],[Env]],SMALL(IF((C7>=tblEnv[[#All],[From Date]])*(C7<=tblEnv[[#All],[To Date]])=1,ROW(tblEnv[[#All],[Env]]),""),2)),"")


    Earliest help would be highly appreciated. M counting on this forum. Thanks in advance.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Return value if within range, return multiple values if ranges overlap
    By cde1983 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 08-17-2013, 06:16 AM
  2. [SOLVED] Return a specific value for a date from a table of date ranges
    By Brit in forum Excel General
    Replies: 3
    Last Post: 07-11-2012, 05:53 AM
  3. Replies: 5
    Last Post: 07-10-2012, 03:03 PM
  4. Replies: 5
    Last Post: 02-10-2012, 12:52 PM
  5. Determining the % of overlap in two date ranges
    By eddienole in forum Excel General
    Replies: 3
    Last Post: 07-29-2011, 04:45 PM

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