+ Reply to Thread
Results 1 to 7 of 7

Date SUM/COUNT

  1. #1
    Registered User
    Join Date
    06-17-2009
    Location
    Lynchburg, VA
    MS-Off Ver
    Excel 2003
    Posts
    9

    Wink Date SUM/COUNT

    From within a column in a separate worksheet I am trying to determine how to sum or count the number of dates listed within that column that fall within a certain date range. For instance, April 1 through April 30, 2009; if there are 10 dates in that column that fall within that date range I want the formula to return the sum of 10.

    Thanks.
    Last edited by hillari158; 06-17-2009 at 03:46 PM.

  2. #2
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Date SUM/COUNT

    A few options in truth, one being

    =SUMPRODUCT(--(Sheet2!A1:A100-DAY(Sheet2!A1:A100)+1=DATE(2009,4,1)))

    useful if doing monthly analysis... for more specific from / to dates, eg 1st April to 20th then:

    =SUMPRODUCT(--(Sheet2!A1:A100>=DATE(2009,4,1)),--(Sheet2!A1:A100<=DATE(2009,4,20)))

  3. #3
    Registered User
    Join Date
    06-17-2009
    Location
    Lynchburg, VA
    MS-Off Ver
    Excel 2003
    Posts
    9

    Re: Date SUM/COUNT

    For some reason, it returns the error #NUM!. I haven't been able to determine why?

  4. #4
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Date SUM/COUNT

    I suspect you are trying to use entire column references - ie A:A ... you can't do that preXL07 and nor should you in a Sumproduct formulae as performance will be affected... keep ranges to a minimum.

  5. #5
    Registered User
    Join Date
    06-17-2009
    Location
    Lynchburg, VA
    MS-Off Ver
    Excel 2003
    Posts
    9

    Re: Date SUM/COUNT

    Yes, that was it. Thanks so much!

  6. #6
    Registered User
    Join Date
    06-17-2009
    Location
    Lynchburg, VA
    MS-Off Ver
    Excel 2003
    Posts
    9

    Re: Date SUM/COUNT

    I need to add one more part to this formula... I need to compare two date range columns as well as another column. The last column returns a 1 if the task started and a 0 if it did not. This will allow me to only include the date in the sum if all requirements have been met. I want to determine whether a task started early, started on time, started late, etc. This is what I came up with but I don't know how to include it.


    With this example I am trying to determine an early start...
    --('Input Data'!K2:K1760,'Input Data'!G2:G1760='Input Data'!H2:H1760,'Input Data'!H2:1760>0)

  7. #7
    Registered User
    Join Date
    06-17-2009
    Location
    Lynchburg, VA
    MS-Off Ver
    Excel 2003
    Posts
    9

    Re: Date SUM/COUNT

    Got it!

    =SUMPRODUCT(--('Input Data'!H2:H1760>=DATE(2009,4,20)),--('Input Data'!H2:H1760<=DATE(2009,4,30)),--('Input Data'!G2:G1760='Input Data'!H2:H1760))

+ 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