+ Reply to Thread
Results 1 to 18 of 18

sumproduct formula only counting dates in column

Hybrid View

  1. #1
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: sumproduct formula only counting dates in column

    In Excel 2003, you can't use whole columns with SUMPRODUCT... and if column M contain dates, the first one should work.

    Can you post a sample workbook showing what you've got and what you are looking to accomplish?

    Also ISDATE is not a valid function.
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  2. #2
    Forum Contributor
    Join Date
    02-16-2010
    Location
    Manchester, England
    MS-Off Ver
    Microsoft 365 for Enterprise
    Posts
    103

    Re: sumproduct formula only counting dates in column

    The formula =SUMPRODUCT(('Export 02-08-2012'!M:M>=A2)*('Export 02-08-2012'!M:M<=B2)) is taking into account that column a and column b contain the start date and end date for each month i'm trying to get a return against

    there are also blanks in the column, basically the column is about 82000 rows, and i just need as best count as possible of what dates in the column are count-able, ignoring non dates and blanks
    Attached Files Attached Files

  3. #3
    Valued Forum Contributor
    Join Date
    09-07-2006
    Posts
    520

    Re: sumproduct formula only counting dates in column

    Think you could try something like this in E1, copied down:
    =SUMPRODUCT(--(TEXT(Export!M$2:M$100,"mmm yyyy")=TEXT(B1,"mmm yyyy")))
    where in B1 down are real dates, eg 1st of month dates such as 01 Jan 2001, 01 Feb 2001, etc

    TEXT is used here to extract the "month-year" from the data in col M in Export and from col B for the comparison
    Sumproduct then adds it up all the instances where the "month-year" comparison matches
    Last edited by Max, Singapore; 08-09-2012 at 09:35 AM.

  4. #4
    Forum Contributor
    Join Date
    02-16-2010
    Location
    Manchester, England
    MS-Off Ver
    Microsoft 365 for Enterprise
    Posts
    103

    Re: sumproduct formula only counting dates in column

    Quote Originally Posted by Max, Singapore View Post
    Think you could try something like this in E1, copied down:
    =SUMPRODUCT(--(TEXT(Export!M$2:M$100,"mmm yyyy")=TEXT(B1,"mmm yyyy")))
    where in B1 down are real dates, eg 1st of month dates such as 01 Jan 2001, 01 Feb 2001, etc

    TEXT is used here to extract the "month-year" from the data in col M in Export and from col B for the comparison
    Sumproduct then adds it up all the instances where the "month-year" comparison matches
    Thanks but still returning the #VALUE! error

    ---------- Post added at 02:50 PM ---------- Previous post was at 02:49 PM ----------

    Quote Originally Posted by NBVC View Post
    Here is your sheet returned with Text to Columns applied to column M.

    Notice that the dates in the first sheet are all in 2001.. whereas the dates in column M are 2011 and 2012...so you will get 0 results if you don't have matches because of the year...
    On re-running the text to columns has worked, alas the formula is still returning a #VALUE! error

  5. #5
    Valued Forum Contributor
    Join Date
    09-07-2006
    Posts
    520

    Re: sumproduct formula only counting dates in column

    > .. Thanks but still returning the #VALUE! error
    Formula should work fine, that just means your source data in Export's col M contains at least 1 instance of #VALUE!
    Use AutoFilter on col M to locate all of these cells with #VALUE!, clear them with the DELETE key
    Max
    Singapore

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

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