+ Reply to Thread
Results 1 to 7 of 7

Using NETWORKDAYS to find holiday date clashes

Hybrid View

  1. #1
    Forum Contributor
    Join Date
    10-27-2006
    Location
    United Kingdom
    MS-Off Ver
    EXCEL 2003 (2007 at home)
    Posts
    517
    =SUMPRODUCT((Z1:Z10>=A2)*(Z1:Z10<=B2)) works because TRUE is 1 and FALSE is 0.

    Thus (Z1:Z10>=A2) gives an array of ten values which can be viewed either as TRUE or FALSE or as 1 or 0.
    similarly for (Z1:Z10>=B2)

    Now 1*1=1, 1*0=0, 0*1=0, 0*0=0.
    So you only get a 1 when (Z1:Z10>=A2) AND (Z1:Z10>=B2) everywhere else you get 0.

    Add them up and there's your answer.

    PS
    =SUMPRODUCT((Z1:Z10>=A2),(Z1:Z10<=B2))
    should also work and can be readily extended :
    =SUMPRODUCT((Z1:Z10>=A2),(Z1:Z10<=B2),(Z1:Z10<=C2)...

    Mark.

  2. #2
    Forum Contributor
    Join Date
    03-30-2007
    Location
    London, UK
    MS-Off Ver
    Microsoft Office 2007
    Posts
    317

    Lightbulb

    Hi Mark,

    Thanks for your help and explanation.
    Best Regards.

    Michael
    -----------------------------------
    Windows Vista, Microsoft Office 2007

+ 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