+ Reply to Thread
Results 1 to 2 of 2

Code to change color and value in calendar cells based on selected dates

  1. #1
    Registered User
    Join Date
    12-17-2009
    Location
    Athens, Greece
    MS-Off Ver
    Excel 2007
    Posts
    16

    Code to change color and value in calendar cells based on selected dates

    I know this might be a fuss so i'd like your help to at least start to the correct direction...
    I keep notes for the leaves of a lot of people.
    I have already created a drop list with all the names and 2 drop calendars in a sheet to select the person and the first and last day of his leave.

    What i want to make is in another sheet, next to the list of names i have, a calendar with all the days of the year, on which the dates i selected (and all between ofcourse), to change color in the row of the person selected...
    After finishing with the "first" person (probably with a button to run a code), it has to be available to do the same for another person, ofcourse without losing the data i have already printed for the first person.

    In case someone wants to help and this is easy for him, i want to add other features too.
    -Color will be "leave type dependent", (i.e. vacation, sickness, etc)
    -To have a range as list, which will display who's absent everyday.
    (And to spice it up, who will be absent for the next "3" days where "3" is
    chosen from a drop list from 1 up to 7 i guess)

    I know i ask too much, but it will save me from a lot of trouble.

    Thanks

    John

  2. #2
    Registered User
    Join Date
    09-18-2010
    Location
    Kalamazoo, MI
    MS-Off Ver
    Excel 2007
    Posts
    37

    Re: Code to change color and value in calendar cells based on selected dates

    I can give you a few pointers about some things, and if you attach your sheet with the data, I might even make it.

    I have created a calendar and submitted it in a different thread today that could possibly be modified to your needs. I would need to see your sheet though.

    In case you'd like to do this yourself, the following are a few things that come to mind about easy ways to achieve your other options:

    The color would just be a simple conditional formatting, where you use a formula saying "A1 = "vacation" with whatever color you want, and so on for the other leave types.

    The range thing sounds like you could make a worksheet_change macro that would autofilter your data using the target as your drop down and the autofilter value as the drop down cell's value.

    Good luck and hope this helped!

+ 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