+ Reply to Thread
Results 1 to 5 of 5

Workdays / Saturdays / Sundays in a Month

  1. #1
    Registered User
    Join Date
    08-17-2012
    Location
    Annapolis, MD
    MS-Off Ver
    Excel 2007
    Posts
    3

    Workdays / Saturdays / Sundays in a Month

    Guys,

    I need a way to calculate the number of workdays, Saturdays and Sundays in a month.

    In my model, the client can choose to work on Saturdays and/or Sundays.
    I need someway to show that a given month (e.g. June 2014) has some # of workdays, and some # of Saturdays and some # of Sundays.

    I can do this on three separate rows.
    eg.
    Row 1: Month
    Row 2: Wordays
    Row 3: Saturdays
    Row 4: Sundays

    Still i need some way of determining that a given month (June 2014) has 22 work days, 4 Saturdays and 5 Sundays,... et cetera


    Any thoughts??

    John Orlando
    In Annapolis, MD

  2. #2
    Registered User
    Join Date
    08-17-2012
    Location
    Annapolis, MD
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: Workdays / Saturdays / Sundays in a Month

    Could I do this via VBA??


    John Orlando
    In Annapolis, MD

  3. #3
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Workdays / Saturdays / Sundays in a Month

    A1 = 1st of any month
    a2
    =NETWORKDAYS(A1,EOMONTH(A1,0)) gives workdays in month
    a3=SUMPRODUCT(--(WEEKDAY(DATE(YEAR($A$1),MONTH($A$1),--ROW(INDIRECT("1:" &DAY(EOMONTH(A1,0))))),2)=6))
    gives no of saturdays
    a4
    =SUMPRODUCT(--(WEEKDAY(DATE(YEAR($A$1),MONTH($A$1),--ROW(INDIRECT("1:" &DAY(EOMONTH(A1,0))))),2)=7))
    gives number of sundays
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  4. #4
    Registered User
    Join Date
    08-17-2012
    Location
    Annapolis, MD
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: Workdays / Saturdays / Sundays in a Month

    Perfect!

    Thank you.

    John,
    In Annapolis.

  5. #5
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Workdays / Saturdays / Sundays in a Month

    Based on your last post in this thread, its apparent that you are satisfied with the solution(s) you've received and have solved your question, but you haven't marked your thread as "SOLVED". I will do it for you this time.

    In future, to mark your thread as Solved, you can do the following -
    Select Thread Tools-> Mark thread as Solved.

    Incase your issue is not solved, you can undo it as follows -
    Select Thread Tools-> Mark thread as Unsolved.

    Also, since you are relatively new to the forum, i would like to inform you that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post which helped you. This adds to the reputation of the person who has taken the time to help you.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

+ 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. Days of the week (to exclude Saturdays/Sundays)
    By btk125 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 02-03-2012, 10:08 AM
  2. Include Saturdays and maybe Sundays?
    By lil_ern63 in forum Excel Formulas & Functions
    Replies: 12
    Last Post: 06-12-2008, 11:38 AM
  3. counting days excluding saturdays and sundays
    By p_dhoke in forum Excel General
    Replies: 2
    Last Post: 04-24-2007, 04:34 AM
  4. [SOLVED] Calculate the number of Saturdays or Sundays between 2 dates?
    By Jim Long in forum Excel General
    Replies: 1
    Last Post: 11-01-2005, 04:09 PM
  5. Subtract Dates excluding Saturdays and Sundays
    By Shirley Munro in forum Excel General
    Replies: 2
    Last Post: 01-14-2005, 06:26 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