+ Reply to Thread
Results 1 to 16 of 16

Working days

  1. #1
    Registered User
    Join Date
    12-09-2013
    Location
    Lancashire, England
    MS-Off Ver
    Excel 2023
    Posts
    39

    Working days

    I am programming a new project which has 800 separate addresses. I have separated these onto 2 separate tabs one for each area and would like to programme 2 jobs a day for each area and I have been using this formula =IF(H2=H1,IF(WEEKDAY(H2,2)=5,H2+3,H2+1),H2) with the start date being in H2. This formula works great but doesn't take into account the public holidays, is there anything I can add to this formula for this or is there a different one to use? Also can I input on a separate tab when the operatives are on leave so no jobs are booked I for these dates?

    Thanks

    Will

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,411

    Re: Working days

    See: http://office.microsoft.com/en-gb/ex...010342719.aspx


    Regards, TMS
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Valued Forum Contributor
    Join Date
    04-22-2014
    Location
    Auckland, New Zealand
    MS-Off Ver
    Office 365 (work) and Excel 2013 (home)
    Posts
    1,167

    Re: Working days

    You can't loop within a function to add 1 until you get the correct number of working days though, so you probably need to do it via VBA.

  4. #4
    Valued Forum Contributor Saarang84's Avatar
    Join Date
    02-19-2009
    Location
    Chennai, India
    MS-Off Ver
    XL 2003 to 2010
    Posts
    812

    Re: Working days

    Post a workbook with sample data to check whether we can formulate a solution
    If my assistance has helped, there is a reputation icon * on the left hand corner below the post - you can show your appreciation to the user who has helped in resolving your requirement.

    If your requirement has been solved please mark your thread as Solved.
    In the menu bar above the very first post, select Thread Tools, then select "Mark this thread as Solved".

    Kindly use [FORMULA] or [CODE] tags when posting your code.

    Regards,
    Sarang

  5. #5
    Registered User
    Join Date
    12-09-2013
    Location
    Lancashire, England
    MS-Off Ver
    Excel 2023
    Posts
    39

    Re: Working days

    I have put a sample as there is 800 properties in total.
    Attached Files Attached Files

  6. #6
    Valued Forum Contributor Saarang84's Avatar
    Join Date
    02-19-2009
    Location
    Chennai, India
    MS-Off Ver
    XL 2003 to 2010
    Posts
    812

    Re: Working days

    Is the first date always input manually or usually the start date is at the start of a particular month or so?

    In general, you can list down the list of holiday dates in a separate column or another sheet and use the WORKDAY function to check whether the next date (out of your formula) is a holiday or not. If its not a holiday, then it can used, else ignored. The argument of the WORKDAY function would be : The start date, the number of days (always 1, i.e. next working day in your case) and the holiday list (referring to the list of holidays). You can refer Excel help for the syntax and example of the WORKDAY function.
    Last edited by Saarang84; 05-18-2014 at 04:36 AM.

  7. #7
    Registered User
    Join Date
    12-09-2013
    Location
    Lancashire, England
    MS-Off Ver
    Excel 2023
    Posts
    39

    Re: Working days

    The start date will be manually inputted.

  8. #8
    Valued Forum Contributor Saarang84's Avatar
    Join Date
    02-19-2009
    Location
    Chennai, India
    MS-Off Ver
    XL 2003 to 2010
    Posts
    812

    Re: Working days

    Refer column I (titled New_Date) in the attached workbook. But, I've changed the dates which you had given initially. Is this what you need?
    Attached Files Attached Files

  9. #9
    Registered User
    Join Date
    12-09-2013
    Location
    Lancashire, England
    MS-Off Ver
    Excel 2023
    Posts
    39

    Re: Working days

    This works brilliant thanks but I am struggling to input this into the spreadsheet I need this for. I have tried copying and pasting and also manually copying the formula into the spreadsheet.

  10. #10
    Valued Forum Contributor Saarang84's Avatar
    Join Date
    02-19-2009
    Location
    Chennai, India
    MS-Off Ver
    XL 2003 to 2010
    Posts
    812

    Re: Working days

    Quote Originally Posted by wjb1976 View Post
    This works brilliant thanks but I am struggling to input this into the spreadsheet I need this for. I have tried copying and pasting and also manually copying the formula into the spreadsheet.
    You can post (or PM me) the a replica of your workbook (with insensitive data, of course) in case if you have posted just a model workbook earlier. I'll recode the formulas as per your need and send it to you.

  11. #11
    Valued Forum Contributor
    Join Date
    04-22-2014
    Location
    Auckland, New Zealand
    MS-Off Ver
    Office 365 (work) and Excel 2013 (home)
    Posts
    1,167

    Re: Working days

    Just this will give you the same results as your own formula, but you'll need a list of the holiday/leave dates you want to skip.
    Formula: copy to clipboard
    Please Login or Register  to view this content.

  12. #12
    Valued Forum Contributor Saarang84's Avatar
    Join Date
    02-19-2009
    Location
    Chennai, India
    MS-Off Ver
    XL 2003 to 2010
    Posts
    812

    Re: Working days

    Quote Originally Posted by gak67 View Post
    Just this will give you the same results as your own formula, but you'll need a list of the holiday/leave dates you want to skip.
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Hi Gak,

    Your formula doesn't work as intended. Refer the screenshot below (highlighted in Red) comparing your formula's output with mine.
    Working_Days.png

  13. #13
    Valued Forum Contributor
    Join Date
    04-22-2014
    Location
    Auckland, New Zealand
    MS-Off Ver
    Office 365 (work) and Excel 2013 (home)
    Posts
    1,167

    Re: Working days

    My formula works as the OP's original formula, but takes into account public holidays if the date in column H and up one row is the same as the date in column H and up 2 rows.

  14. #14
    Registered User
    Join Date
    12-09-2013
    Location
    Lancashire, England
    MS-Off Ver
    Excel 2023
    Posts
    39

    Re: Working days

    Would it be possible to allow for an operative to be made unavailable for half a day and to allow for 1 job job to be booked in instead of 2 this is to allow for any training this wont be for everyday only when necessary.

  15. #15
    Registered User
    Join Date
    12-09-2013
    Location
    Lancashire, England
    MS-Off Ver
    Excel 2023
    Posts
    39

    Re: Working days

    Hi

    How can i adjust this to change the amount of appointments per day? This currently is allowing for 2 appointments per day.

  16. #16
    Valued Forum Contributor Saarang84's Avatar
    Join Date
    02-19-2009
    Location
    Chennai, India
    MS-Off Ver
    XL 2003 to 2010
    Posts
    812

    Re: Working days

    Quote Originally Posted by wjb1976 View Post
    Hi

    How can i adjust this to change the amount of appointments per day? This currently is allowing for 2 appointments per day.
    Hi,

    Can you post a sample workbook?

+ 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. Calculate total working days and excepted leave days
    By megaiooo in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 07-21-2013, 09:29 AM
  2. Show days in a month dynamically + working days
    By vemix in forum Excel General
    Replies: 5
    Last Post: 12-28-2012, 07:54 AM
  3. Help Working Out Relative Dates and Non Working Days
    By leungf in forum Excel General
    Replies: 0
    Last Post: 08-07-2012, 12:06 PM
  4. Previous working days date (Mon-Fri working week).
    By intothewild in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-22-2011, 01:00 PM
  5. Excel 2007 : Converting days to working days
    By poboy2214 in forum Excel General
    Replies: 5
    Last Post: 02-18-2010, 01:22 PM

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