+ Reply to Thread
Results 1 to 4 of 4

Color cell based on date criteria

  1. #1
    Registered User
    Join Date
    12-19-2009
    Location
    Goldsboro, N
    MS-Off Ver
    Excel 2003
    Posts
    21

    Color cell based on date criteria

    I have a workbook "Schedule" that Sheet1 is renamed to "Staff". I have a cell range named "Holidays located at cell K2 to K13 that Holiday dates are entered. I have several sheets that will be the staffs schedule starting with Sheet4 thru Sheet40. I need a formula, vba code to change the color of each cell (dated) corresponding with the Holiday date listed on Sheet1 "Staff" to each of the staff (sheet4 thru 40). IE: MLK day entered on "Staff" sheet one will color 1/16/12 for each sheet4 thru 40.

    I've attached the file for review.
    Attached Files Attached Files

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,917

    Re: Color cell based on date criteria

    highlight the entire range for sheet4 and use this...
    =NOT(ISERROR(VLOOKUP(C5,Holidays,1,FALSE)))

    I tried to use group mode on the sheets to Cf them all together, but it wont allow that. you could record a small macro to do it for you, or just manually CF each sheet
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Registered User
    Join Date
    12-19-2009
    Location
    Goldsboro, N
    MS-Off Ver
    Excel 2003
    Posts
    21

    Re: Color cell based on date criteria

    I could not get it to work. Could you reattach the file with your formula entered.

  4. #4
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,917

    Re: Color cell based on date criteria

    sure, see attached. i only did sheet1, and i had to delete a bunch of sheets to make it small enough to upload
    Attached Files Attached Files

+ 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