+ Reply to Thread
Results 1 to 3 of 3

how do i create macro that will auto color fill and lock columns if day is weekend HELP

  1. #1
    Registered User
    Join Date
    07-12-2013
    Location
    my, house
    MS-Off Ver
    Excel 2007
    Posts
    1

    how do i create macro that will auto color fill and lock columns if day is weekend HELP

    I manually create timesheets for 20 people and I have to manually lockdown weekends and hoidays that are also manually color filled columns. If anyone can help me make this be an automatic process as the months change I would really appreciate it.

  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,944

    Re: how do i create macro that will auto color fill and lock columns if day is weekend HEL

    Hi and welcome to the forum

    You can use Conditional Formatting for this, you dont need a macro.
    1. highlight the range you want to apply the conditional formatting to
    2. on the home tab, styles, select CF
    3. select new rule, select use formula
    4. enter =WEEKDAY(D1,2)>5 format fill as needed
    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
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: how do i create macro that will auto color fill and lock columns if day is weekend HEL

    Hello nt_excel help,

    Welcome to the Forum!

    It is difficult to understand what you need without seeing your layout. Can you provide a workbook with an example of how this data is laid out?

    How To Post Your Workbook
    1. At the bottom right of the Reply window, Click the button Go Advanced
    2. At the top of the Your Message Window, in the first row of icons, Click the Paperclip icon.
    3. Click the Add Files button at the top right in the dialog box. This displays the File Manager dialog.
    4. Click the Select Files button at the bottom middle of the dialog.
    5. In the new window Find the file you want to upload, select it, and Click Open.
    6. You will now be back in the File Manager dialog. Click the bottom Middle button Upload File.
    7. Wait until the file has completely uploaded before you exit the File Manager dialog.

    File Manger Picture
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

+ 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