+ Reply to Thread
Results 1 to 3 of 3

how to sum day if it falls in a weekend or holiday?

  1. #1
    Valued Forum Contributor
    Join Date
    12-22-2010
    Location
    Texas
    MS-Off Ver
    Excel 2003 & Excel/Access 2007
    Posts
    438

    how to sum day if it falls in a weekend or holiday?

    Not sure if possible to do in access but i'd like to count 15 days from today & if the day falls on Sat, Sun or if the 15th day is a holiday skip to the next working day. I got this for excel and it works fine:

    =WORKDAY(TODAY()+15,1,$A$2:$A$13)-1

    I'm trying to automate things so we don't have to input information ourselves. If the holiday part can't be done then at least skipping the weekends would be nice.

    Again not sure if possible...
    Last edited by jgomez; 11-30-2011 at 01:54 PM.

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,873

    Re: how to sum day if it falls in a weekend or holiday?

    This video will give you some basics on selecting only non holiday weekdays. You will have to amend it for your +15 days and skip to next weekday, but it should not be difficult. Create your query and if you get stuck, post back with your SQL statement and what you want to accomplish and the expected results and we will help you achieve your solution.

    http://www.datapigtechnologies.com/f...yworkdays.html

    Alan
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  3. #3
    Valued Forum Contributor
    Join Date
    12-22-2010
    Location
    Texas
    MS-Off Ver
    Excel 2003 & Excel/Access 2007
    Posts
    438

    Re: how to sum day if it falls in a weekend or holiday?

    I'm not good at VBA, SQL or much of anything but I figured out how to work this out. If any of you know a good starting book or article let me know.

    the attached excel sheet has three columns. Column A has todays date until the year 2020. Column B has federal holidays from this year until 2020. Column C calculates 15 days from day in column A & excludes weekends & adds another day if the 15th day happens to be a holiday.

    I uploaded the attachment into access & linked it to a table i had there that has date() as one of the fields so everyday it will give me what i need.

    hope it helps & makes sense.
    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