+ Reply to Thread
Results 1 to 11 of 11

Clear Calendars of List From Holidays Sheet

  1. #1
    Banned User!
    Join Date
    10-12-2018
    Location
    Texas
    MS-Off Ver
    2010
    Posts
    358

    Clear Calendars of List From Holidays Sheet

    Hello,

    Is there a way to clear the calendars of the list from the Holidays! sheet when changing the year in the Setup sheet?

    Thank you,
    XJ

  2. #2
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,327

    Re: Clear Calendars of List From Holidays Sheet

    What do you mean by clear when changing the year?
    HTH
    Regards, Jeff

  3. #3
    Banned User!
    Join Date
    10-12-2018
    Location
    Texas
    MS-Off Ver
    2010
    Posts
    358

    Re: Clear Calendars of List From Holidays Sheet

    I plan to use this in the 2019 year so when I change the date in the Setup sheet for 2019 I want the holiday list from 2018 that were put in the holiday sheets to clear.

    For instance in January sheet the range A4:N8 to clear contents and repeat to the next rows down and then for each other calendar sheet.

    So if I wasn't clear.

    I appreciate the help

  4. #4
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,327

    Re: Clear Calendars of List From Holidays Sheet

    Ok, but let me ask first, why clear 2018 when you can just create a huge list of holidays from 2018 thru as many years as you would like.

  5. #5
    Banned User!
    Join Date
    10-12-2018
    Location
    Texas
    MS-Off Ver
    2010
    Posts
    358

    Re: Clear Calendars of List From Holidays Sheet

    The Holiday sheet has US Holidays plus the other days that my company decides to take off so it would be nice to be dynamic for each year please.

    I suppose I can use this:

    Worksheets("January").Range("A4:N8").ClearContents

    Then put one line for each range on each sheet. I think it's about 60 lines of code.

  6. #6
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,327

    Re: Clear Calendars of List From Holidays Sheet

    Try this...

    Please Login or Register  to view this content.
    How can the holiday's be dynamic when you say, "plus the other days that my company decides to take off".

    Again, why not just build 2019 below 2018, 2020 below 2019 etc. Other then that, still not clear on what you want besides the macro above to clear the month tabs.

    As you can see, I didn't fill in all the month tabs, but I'm sure you can fill in the rest.
    Last edited by jeffreybrown; 11-18-2018 at 06:03 PM.

  7. #7
    Banned User!
    Join Date
    10-12-2018
    Location
    Texas
    MS-Off Ver
    2010
    Posts
    358

    Re: Clear Calendars of List From Holidays Sheet

    Jeffrey each year the holidays aren't on the same day of the week so my company will decide which days to take off based on the days they fall. Yes I agree I can make one for each year manually but I thought it would be more useful this way sorry if it's too much trouble.

  8. #8
    Banned User!
    Join Date
    10-12-2018
    Location
    Texas
    MS-Off Ver
    2010
    Posts
    358

    Re: Clear Calendars of List From Holidays Sheet

    I added the other months but it didn't clear the contents:

    Please Login or Register  to view this content.

  9. #9
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,327

    Re: Clear Calendars of List From Holidays Sheet

    It's not too much trouble, just trying to understand how you make a formula to work on the company deciding what day to take off.

    As far a manually, you don't have to make the holiday manually. You can use a formula such as you have, but also take a look here.

    In this example, the formula in column C is tied to the named range theyear, but you could add in column D the year and then replace that in the formula.

    Can you give me an example?

    I added the other months but it didn't clear the contents:
    I updated the code in post #6. Sorry my fault as I missed a couple of important items.
    Attached Files Attached Files
    Last edited by jeffreybrown; 11-18-2018 at 06:16 PM.

  10. #10
    Banned User!
    Join Date
    10-12-2018
    Location
    Texas
    MS-Off Ver
    2010
    Posts
    358

    Re: Clear Calendars of List From Holidays Sheet

    Thank you Jeffrey you were a tremendous help today.

    The only thing lacking now is to fill in December with dates that show the first few days in January in case we take them off.

    If it's the 2018 year it should show 'New Year's Day' in the Jan 1st spot. Then also show if we take a few days off after that.

    Not sure if this is possible.

    Thanks,
    XJ

  11. #11
    Banned User!
    Join Date
    10-12-2018
    Location
    Texas
    MS-Off Ver
    2010
    Posts
    358

    Re: Clear Calendars of List From Holidays Sheet

    I think maybe a separate list for these extra days?

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Summary sheet from monthly calendars
    By BDD2015 in forum Excel General
    Replies: 52
    Last Post: 04-23-2018, 09:34 AM
  2. [SOLVED] How to include holidays in monthly time sheet that appears as "H" for holidays -
    By royeedominsy in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 12-08-2015, 07:59 AM
  3. How to include holidays in monthly time sheet that appears as H for holidays -
    By royeedominsy in forum Hello..Introduce yourself
    Replies: 1
    Last Post: 12-08-2015, 01:53 AM
  4. Replies: 3
    Last Post: 08-06-2014, 09:13 PM
  5. Button to clear sheet and automatic clear rows
    By sandbach in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 09-29-2010, 02:06 PM
  6. List box VBA script to clear cell in other sheet.
    By Calle in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-03-2006, 03:00 PM
  7. 2006 calendars with UK holidays
    By rbd in forum Excel General
    Replies: 0
    Last Post: 02-09-2006, 05:55 AM

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