+ Reply to Thread
Results 1 to 4 of 4

SUMPRODUCT search between two dates

  1. #1
    Registered User
    Join Date
    05-09-2012
    Location
    A
    MS-Off Ver
    Excel 2010
    Posts
    11

    SUMPRODUCT search between two dates

    Hi,

    I would appreciate any help on this formula.

    Please Login or Register  to view this content.
    What I'm trying to do is have the formula return the count of inspections by type between two dates (measuring quarters).
    The code works fine when counting items for a month from one date.

    So in a nutshell how would you get the section:
    Please Login or Register  to view this content.
    To count between two date ranges e.g. I have a table listing Q1 1-Jan-12 31-Mar-12 in separate cells.

    Hope that makes sense. Thanks in advance!

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

    Re: SUMPRODUCT search between two dates

    To check between 2 dates,
    the required condition's syntax is something like this:
    (Range>= -- "Start Date")*(Range<= -- "End Date")
    eg: (Range>= -- "1-Jan-12")*(Range<= -- "31-Mar-12")

    --------------
    Success? Celebrate it, hit the star button at the bottom left of my responses

  3. #3
    Registered User
    Join Date
    05-09-2012
    Location
    A
    MS-Off Ver
    Excel 2010
    Posts
    11

    Re: SUMPRODUCT search between two dates

    Thanks Max. Its still not working for me, I've tried different variations of the formula you posted.

    Maybe to clear things up, I just need it to search between the two dates, for example:

    =SUMPRODUCT((TEXT(Table211[Date],"mmyy")=TEXT($B3,"mmyy"))*(Table211[Inspection Type]=G2))
    *in this section here I just want it to return results between the dates I have in B3 and C3.

    So how would I make (Range>= -- B3)*(Range<= -- C3) work in this formula?

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

    Re: SUMPRODUCT search between two dates

    > ... (Range>= -- B3)*(Range<= -- C3)
    If your Start and End Dates are housed within cells, then the double minus is not required,
    viz: (Range>= B3)*(Range<= C3)
    where B3 and C3 must contain real dates

    Try something like this in your expression, indicatively:
    =SUMPRODUCT( (Range>= B3)*(Range<= C3)*(Table211[Inspection Type]=G2))

+ 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