+ Reply to Thread
Results 1 to 4 of 4

Range lookups with overlapping entries and extra check

  1. #1
    Registered User
    Join Date
    07-02-2010
    Location
    Leiden, Netherland
    MS-Off Ver
    Excel 2003
    Posts
    3

    Range lookups with overlapping entries and extra check

    Hello,

    Using conditional formatting I would like to highlight days in a calender. I have done so already using the rule below.
    To simplify the adding of people to the calendar I would like to extend this conditional formatting but I have no idea how.

    So the conditional format should give true if the date in the cell is in the range given by VacationStart and VacationEnd AND the name in that row should be matched.

    With INDEX and MATCH one can search through ranges but it is dependend on the sort order of the row and in the example below one has a problem with August 21.

    Has anyone a solution for this?

    Regards,

    Marcel

    A B C D

    1 Vacation
    2 DATE DATE NAME DESCRIPTION
    3 31-Jul-2010 21-Aug-2010 Jeremy Summer vacation
    4 21-Aug-2010 21-Aug-2010 Sunny Free day
    5 21-Aug-2010 21-Aug-2010 Bart Free day
    6 27-Dec-2010 31-Dec-2010 Jeremy Christmas vacation
    7 29-Dec-2010 31-Dec-2010 Sunny Christmas vacation


    Named Ranges:

    VacationStart: A3-A99
    VacationEnd : B3-B99
    Names : C3-C99

    =IF(ISREF(INDEX(VacationEnd,MATCH(E8,VacationStart, 1),1)),IF(E8<=INDEX(VacationEnd,MATCH(E8,VacationStart, 1),1), TRUE, FALSE), FALSE)

  2. #2
    Forum Expert
    Join Date
    08-27-2008
    Location
    England
    MS-Off Ver
    2010
    Posts
    2,561

    Re: Range lookups with overlapping entries and extra check

    Really hard to work out exactly what you need without an example workbook...
    CC


    If you feel really indebted please consider a donation to charity. My preferred charity is ActionAid but there are plenty of worthy alternatives.

  3. #3
    Registered User
    Join Date
    07-02-2010
    Location
    Leiden, Netherland
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: Range lookups with overlapping entries and extra check

    Hello,

    As requested an example worksheet.

    On the first Tab a Calender that gets coloured with conditional formulas based on values on the tables on the other sheets.

    Per person there is one sheet with their vacation / part-time / home working days.

    What I want is to combine all the person vacation tables into one table so I only have one conditional formula. Instead of tables / Named ranges and conditional formulas for each person.
    In that way adding/removing a person is easy instead of difficult.

    I only added a Name column in the person 'Marcel' tab to test with.

    Regards,

    Marcel
    Attached Files Attached Files

  4. #4
    Forum Expert
    Join Date
    08-27-2008
    Location
    England
    MS-Off Ver
    2010
    Posts
    2,561

    Re: Range lookups with overlapping entries and extra check

    Based on E5:

    =SUMPRODUCT(-($B5=Marcel!$C$3:$C$6),-(E5>=Marcel!$A$3:$A$6),--(E5<=Marcel!$B$3:$B$6))

    But this will significantly affect the speed of your worksheet. It might be worth considering rearranging your data to make this easier...

    HTH

+ 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