+ Reply to Thread
Results 1 to 4 of 4

Weekday Function and getting public holiday date

  1. #1
    Registered User
    Join Date
    06-04-2008
    Posts
    28

    Weekday Function and getting public holiday date

    I have 2 related questions to ask:

    1. I have a list of dates and I will want to set my next column(Workday) to 1 if the date is monday to saturday but 0 if the date is on a sunday like this:

    Screenshot


    2. I will like to set my WorkDay to 0 at sheet 1 if the date is a public holiday entered at sheet 2.

    Sheet 1

    Sheet 2

    In conclusion, how am I suppose to write the formula for my workday(column) as shown that meet my 2 requirements stated?
    Last edited by VBA Noob; 06-11-2008 at 02:36 AM.

  2. #2
    Forum Expert oldchippy's Avatar
    Join Date
    02-14-2005
    Location
    Worcester, UK
    MS-Off Ver
    Excel 2007 (Home)
    Posts
    7,097
    Hi JuzMe,

    Does this help?
    Attached Files Attached Files
    oldchippy
    -------------


    Blessed are those who can give without remembering and take without forgetting

    If you are happy with the help you have received, please click the <--- STAR icon on the left - Thanks.

    Click here >>> Top Excel links for beginners to Experts

    Forum Rules >>>Please don't forget to read these

  3. #3
    Registered User
    Join Date
    06-04-2008
    Posts
    28
    That is really helpful. But I got a question for the part 2 of my question.

    Is it possible to set my work day to 0 for each holiday added to my sheet 2 automatically?

    For instance,

    There is a new holiday on 1st of july 2008. Is it possible to set the workday to 0 automatically at sheet 1 once the new holiday is added at sheet 2?

  4. #4
    Forum Expert oldchippy's Avatar
    Join Date
    02-14-2005
    Location
    Worcester, UK
    MS-Off Ver
    Excel 2007 (Home)
    Posts
    7,097
    Hi,

    Is it possible to set the workday to 0 automatically at sheet 1 once the new holiday is added at sheet 2?
    Yes by creating a Dynamic named range for the dates on Sheet2, then when ever you add any futher dates to the list the formula on Sheet1 includes them in the Vlookup.

    http://www.contextures.com/xlNames01.html#Dynamic

    For this to happen on Sheet1 the Vlookup formula includes the "named range" rather than the cell references. In this case it is called "DateList".

    See the attached for a working sample

    There is a new holiday on 1st of july 2008
    Are we talking UK, if so yippee.......more time off!
    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