+ Reply to Thread
Results 1 to 5 of 5

Include certain weekend in workday formula

  1. #1
    Registered User
    Join Date
    01-21-2014
    Location
    Ireland
    MS-Off Ver
    Office 365 Pro Plus at work, Office Pro Plus 2010 at home
    Posts
    3

    Include certain weekend in workday formula

    Hi Guys.

    Long time lurker here.
    The forum is a godsend. I am visiting it on a daily basis, and I have to thank to all you good people out there all the excel knowledge I gathered.
    Here is something that I can't solve.

    Attached worksheet: test solution for workdays.xlsx

    This is a worksheet set up to create a "calendar" horizontally that only include workdays of a given month. This would be simple enough.
    However, when we are getting close to a month end or a Quarter end, we might want to add a few weekends to deal with the volume we have to cater for.
    (I know it would be a lot simpler to include all weekends and zero out whatever we don't want to cater for, but I enherited this "troublesome" format and my manager don't want to know anything else.)
    Well. that's life I suppose
    To create Saturdays and Sundays would be as simple as -1 from a Monday's value to add in a Sunday, or -2 to add in a Saturday in Row1.

    I have worked it out so far, where by I am finding the workdays after the weekends from the right to the left. As 1,2. 3,4. Mondays and Tuesdays respectively.
    I am trying to add checkboxes and add in an if statement to row 1 saying if we check checkbox 1 then find 1,2 and minus out the neccesary to create Sat and Sun.
    Unfortunately when I try to do this it tells me that this would result in a circular reference.
    Wonder if there is a workaround to this, because I am deriving the days that follow the weekends, from the date I want to modify.

    PS: every yellow cell in the sheet is an input and set to be modified.

    Any help is most appreciated.

    Thanks

    Tom.

  2. #2
    Valued Forum Contributor natefarm's Avatar
    Join Date
    04-22-2010
    Location
    Wichita, Kansas
    MS-Off Ver
    2016
    Posts
    1,020

    Re: Include certain weekend in workday formula

    I'm not sure if you want it to "add a few weekends", as you said above, or if you want to "add last weekend", as it says with the checkbox in your workbook. If you copy the formula below to cell U1, then drag it right through AD1, it will work for the last two weekends.

    Formula: copy to clipboard
    Please Login or Register  to view this content.

    To make it more flexible than that (like with a variable indicating how many weekends) would be more of a challenge, but you could easily adjust it from one month to the next by just dragging the previous formula (in T1) to the right as far as needed, or dragging the new formula to the left as far as needed.
    Acts 4:12
    Salvation is found in no one else, for there is no other name under heaven given to mankind by which we must be saved.

  3. #3
    Registered User
    Join Date
    01-21-2014
    Location
    Ireland
    MS-Off Ver
    Office 365 Pro Plus at work, Office Pro Plus 2010 at home
    Posts
    3

    Re: Include certain weekend in workday formula

    Thanks natefarm.


    It is challenging indeed. I am pretty sure that the way I want to do it would result in a circular reference. I will have to spend some more time on this to make it bulletproof.
    Right now I am exploring the vba possibilities, when the checkbox is checked the vba code will find the first instance and would -2 out of the date value.
    We will see how it goes.

    Thanks for your help!

  4. #4
    Valued Forum Contributor natefarm's Avatar
    Join Date
    04-22-2010
    Location
    Wichita, Kansas
    MS-Off Ver
    2016
    Posts
    1,020

    Re: Include certain weekend in workday formula

    Does the above formula not work, as far as it goes?

  5. #5
    Registered User
    Join Date
    01-21-2014
    Location
    Ireland
    MS-Off Ver
    Office 365 Pro Plus at work, Office Pro Plus 2010 at home
    Posts
    3

    Re: Include certain weekend in workday formula

    Yes it does.
    Maybe I will try to section it out for the weeks and add in a few more checkboxes.
    I think I might just have to get rid of the exclusion of days so it will not mess up everything.

    Thanks again!

+ 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. Replies: 17
    Last Post: 08-26-2014, 01:05 PM
  2. [SOLVED] Workday vs Weekend
    By nelkin in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 05-03-2013, 09:37 AM
  3. Getting autofill to not include weekend dates
    By ibabs in forum Excel General
    Replies: 5
    Last Post: 05-07-2009, 05:29 PM
  4. Count Workday include Saturday
    By TCLehmann in forum Excel General
    Replies: 1
    Last Post: 11-23-2005, 05:30 PM
  5. If function for workday & weekend
    By insplkm in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 11-12-2005, 09:30 PM

Tags for this Thread

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