Results 1 to 1 of 1

Dynamic Date Count

Threaded View

  1. #1
    Registered User
    Join Date
    06-16-2011
    Location
    Asheville, NC
    MS-Off Ver
    Excel 2003
    Posts
    1

    Dynamic Date Count

    Hey I need to create a spreadsheet that will count days between start date and todays date with the following stipulations:

    1.) Need to exclude sundays
    2.) Need to exclude holidays

    and the one that is giving me fits...
    3.) exclude non workdays ..... these are days that we don't work because of weather and other reasons, like we don't want to work on a particular saturday but some saturdays we do....

    Networkdays works well , because you simple add days to the 'holiday list' and they will not be counted. You can also correct the Networkdays counting of only weekdays by adding the number saturdays to the day count.....BUT not all saturdays are work days....hence my problem...

    Below is my list of formulas

    =SUM(IF(ISERROR(MATCH(WEEKDAY(ROW(INDIRECT(D6&":"&C6))),{1},0)),1,0))
    returns the number of days minus sunday

    =NETWORKDAYS(D6,C6,'Days Worked Lists'!I5:I35)+J6
    returns the number of days minus holidays and adds back saturdays

    =SUM(IF(ISERROR(MATCH(WEEKDAY(ROW(INDIRECT(D6&":"&C6))),{1,2,3,4,5,6},0)),1,0))
    returns the number of saturdays in the date range....as you can see this is an array formula. This formula is represented by "J6" in above formula and I think is the problem, because when I add a Saturday to the Holiday/nonworkdays list, it is not recognized and therefore is counted.

    =SUMPRODUCT(N(WEEKDAY(ROW(INDIRECT(D6&":"&C6)))<>1))
    another way of counting days minus sunday....easier to follow


    This is what I think is happening....the formula represented by J6, which is an array, overides the holiday list of networkdays.....because what I was doing was adding in the saturdays that we dont work....

    I need this spreedsheet to work for someone that can only enter date into excel....

    I know I am rambling but I want to give everyone all the info, because I think this is something that others would really like to use. So in summary , I want a spread sheet that you enter a start date and holidays and non workdays and the end result is the number of days worked from a start date and todays date or end date.......the list of holidays and non work days needs to be added to on a regular basis. And the catch, some saturdays we work and some we don't.

    Please help
    Last edited by Staggers72; 06-16-2011 at 12:03 PM.

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