Results 1 to 3 of 3

Thread: Selective Highlighting Of Leaves Holiday In Calendar Through Conditional Format

  1. #1
    Member
    Join Date
    Jun 2012
    Posts
    80
    Rep Power
    13

    Selective Highlighting Of Leaves Holiday In Calendar Through Conditional Format

    Hello Guys,

    I would like to know how to perform selective highlighting in excel.
    Basically, I have a calendar in excel and besides that are names of employees of my dept. So i need some formula or VBA or anything that highlights the annual leave days on the calendar when I click on a employees name.

    Sheet 1 is the 2013 calender and besides it are the names of the employee (when clicked needs to highlight their respective leave days), Sheet 2 contains the names of employees and their leave dates. Please note, i will change the names in Sheet 2 according to the departments.

    Please find the attached workbook...

    Thanks...
    Attached Files Attached Files

  2. #2
    Administrator Excel Fox's Avatar
    Join Date
    Mar 2011
    Posts
    1,402
    Rep Power
    10
    Here's a way of doing it using Conditional Format

    Create named ranges

    EmployeeList =OFFSET('Leave Dates'!$B$1,1,0,COUNTA('Leave Dates'!$B$2:$B$30),1)
    StartDate =OFFSET('Leave Dates'!$C$1,1,0,COUNTA('Leave Dates'!$B$2:$B$30),1)
    EndDate =OFFSET('Leave Dates'!$D$1,1,0,COUNTA('Leave Dates'!$B$2:$B$30),1)

    Create a validation list somewhere in the calendar sheet, say in AH11

    Create named range

    SelectedEmployee ='Leave Schedule'!$AH$11

    The select the entire calendar starting from B13 and use the formula section of conditional formatting with the following formula

    =(B13>=INDEX(StartDate,MATCH(SelectedEmployee,Empl oyeeList,0)))*(B13<=INDEX(EndDate,MATCH(SelectedEm ployee,EmployeeList,0)))

    Attached working file for reference....
    Attached Files Attached Files
    A dream is not something you see when you are asleep, but something you strive for when you are awake.

    It's usually a bad idea to say that something can't be done.

    The difference between dream and aim, is that one requires soundless sleep to see and the other requires sleepless efforts to achieve

    Join us at Facebook

  3. #3
    Member
    Join Date
    Jun 2012
    Posts
    80
    Rep Power
    13
    Thanks for the help!! You guys are just great.

    However, i aint that advanced to understand what you wrote with the coding above. But the file does its job nonetheless.

    I would like to know though, how did you make the drop down list next to the calendar?
    Last edited by msiyab; 02-06-2013 at 01:18 PM.

Similar Threads

  1. Replies: 21
    Last Post: 05-27-2013, 08:45 PM
  2. Red Green Amber Three Color Conditional Format
    By paul_pearson in forum Excel Help
    Replies: 1
    Last Post: 03-07-2013, 06:50 PM
  3. Custom Format Conditional With Square Bracket
    By Slotmachineguy in forum Excel Help
    Replies: 2
    Last Post: 11-09-2012, 11:42 PM
  4. Conditional Format Based On Percentage Variance
    By srizki in forum Excel Help
    Replies: 3
    Last Post: 10-09-2012, 03:28 AM
  5. Replies: 4
    Last Post: 07-27-2012, 08:43 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •