+ Reply to Thread
Results 1 to 2 of 2

SUMPRODUCT with Date Range and a Criteria

  1. #1
    Registered User
    Join Date
    05-24-2010
    Location
    Rockville, MD
    MS-Off Ver
    Excel 2007
    Posts
    57

    SUMPRODUCT with Date Range and a Criteria

    I want the count of days that each person has worked. B1 is where I would type in the name of the employee and the function would tell me how many days he has worked based on the perimeter provided (<=C5 (July 31) and >=D5 (May 1st)). I created the function below but got an error (#N/A). Please Help!! Thank you!



    1) =SUMPRODUCT((BASE_PBI_01_21!$CP$2:$CP$10000=$B$1)*(BASE_PBI_01_21!$BZ$2:$BZ$100000<=$C$5)*(BASE_PBI_01_21!$BZ$2:$BZ$100000>=$D$5)) -->Error (#N/A)
    2) =SUMPRODUCT((BASE_PBI_01_21!$CP$2:$CP$10000=$B$1),(BASE_PBI_01_21!$BZ$2:$BZ$100000<=$C$5),(BASE_PBI_01_21!$BZ$2:$BZ$100000>=$D$5)) --> Error (#Value!)


    -DH
    Last edited by Dhoang25; 02-17-2015 at 10:57 AM.

  2. #2
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675

    Re: SUMPRODUCT with Date Range and a Criteria

    The second approach won't work because you are not "co-ercing" the TRUE/FALSE arrays

    The first approach is correct syntactically but you need all ranges the same size (some ranges end at row 10,000 some at row 100,000)

    In Excel 2007 probably better to use COUNTIFS like this:

    =COUNTIFS(BASE_PBI_01_21!$CP:$CP,$B$1,BASE_PBI_01_21!$BZ:$BZ,"<="&$C$5,BASE_PBI_01_21!$BZ:$BZ,">="&$D$5)
    Audere est facere

+ 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. Sumproduct using Name Range as Criteria
    By azaremb in forum Excel General
    Replies: 4
    Last Post: 07-15-2014, 11:40 AM
  2. [SOLVED] Sumproduct Formula - With date range and multiple criteria
    By kellydvorak in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 01-19-2014, 09:07 PM
  3. [SOLVED] COUNTIF / SUMPRODUCT- multiple criteria - including date range
    By Sph01 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 08-31-2012, 04:54 AM
  4. Using SUMPRODUCT to look a date criteria.
    By mtahboub in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 06-06-2012, 01:47 AM
  5. Sumproduct using date criteria
    By Turbo68 in forum Excel General
    Replies: 2
    Last Post: 04-03-2012, 03:46 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