+ Reply to Thread
Results 1 to 6 of 6

Sumproduct for 3 Criteria (between 2 dates, plus a matching text entry other cell)

  1. #1
    Registered User
    Join Date
    04-11-2013
    Location
    Cardiff
    MS-Off Ver
    Excel 2007
    Posts
    3

    Unhappy Sumproduct for 3 Criteria (between 2 dates, plus a matching text entry other cell)

    Hi All,

    Long time reader, first time poster - I really hope you guys can help!

    I'm setting up an excel tracker that looks for the date in another tab and checks it is between 2 dates. Sounds simple enough at the moment - for this i'm using the following formula:

    =SUMPRODUCT(--('It Drives Me Crazy'!$C$3:$C$65000>=D2*1),--('It Drives Me Crazy'!$C$3:$C$65000<=D3*1))

    (The starting date is in cell D2 and end date for range I'm looking for is in D3)

    The next part is where I'm hitting a problem. I want to do the same search, but add on a criteria which does the same search, but also needs to match the site I'm specifying in another column of the tab I'm referencing. For example, in the "It Drives Me Crazy" tab, I want to find all Cardiff site records in my date range. I've tried using SUMPRODUCT, SUMIFS, COUNTIFS, everything but can't get it to work.

    At the moment I'm trying this formula:

    =SUMPRODUCT(--('It Drives Me Crazy'!$C$3:$C$65000>=D2*1),--('It Drives Me Crazy'!$C$3:$C$65000<=D3*1),--('It Drives Me Crazy'!G3:G7="Cardiff"))

    I'm not returning anything in the cell at the moment other than ###

    Can anyone suggest how to fix my formula?

    Thanks in advance

  2. #2
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: Sumproduct for 3 Criteria (between 2 dates, plus a matching text entry other cell)

    Please attach a sample workbook with expected output for better understanding


    If your problem is solved, then please mark the thread as SOLVED>>Above your first post>>Thread Tools>>
    Mark your thread as Solved


    If the suggestion helps you, then Click *below to Add Reputation

  3. #3
    Valued Forum Contributor Lemice's Avatar
    Join Date
    04-13-2013
    Location
    Somewhere.
    MS-Off Ver
    Excel 2016
    Posts
    696

    Re: Sumproduct for 3 Criteria (between 2 dates, plus a matching text entry other cell)

    Hello,

    I think you are hitting #VALUE! error because the reference of them are different (the first 2 searches are from C3 to C65000, while the last one is ranging from G3 to G7).
    If you only look for value that hit all 3 criteria, perhaps you only want to look from row 3 to 7, because only in those 5 rows you can find "Cardiff"?
    (copy pasta from Ford)
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools

    Regards,
    Lem

  4. #4
    Registered User
    Join Date
    04-11-2013
    Location
    Cardiff
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: Sumproduct for 3 Criteria (between 2 dates, plus a matching text entry other cell)

    Quote Originally Posted by :) Sixthsense :) View Post
    Please attach a sample workbook with expected output for better understanding

    Example Workbook.xlsx

    Have stripped it back to just the 2 tabs I'm working with for the example - hope this helps!

    Lemice - I've only been using the G3 to G7 range at the moment while I work out how to get the formula working. My aim is to extend that across the same range as the other column once figured out
    Last edited by Adam9W; 04-19-2013 at 06:57 AM.

  5. #5
    Valued Forum Contributor Lemice's Avatar
    Join Date
    04-13-2013
    Location
    Somewhere.
    MS-Off Ver
    Excel 2016
    Posts
    696

    Re: Sumproduct for 3 Criteria (between 2 dates, plus a matching text entry other cell)

    One solution to this is to change the reference of the last criteria
    Please Login or Register  to view this content.
    You can change "Cardiff" to $B5, so that you can drag it down easier.

  6. #6
    Registered User
    Join Date
    04-11-2013
    Location
    Cardiff
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: Sumproduct for 3 Criteria (between 2 dates, plus a matching text entry other cell)

    [QUOTE=Lemice;3204712]One solution to this is to change the reference of the last criteria
    Please Login or Register  to view this content.
    Lemice - Thank you so much! This has worked and I'm now starting to question why I hadn't seen this myself. I didn't realise that the range for the columns needed to be the same. Nice tip too about using the $B5 reference - I've been doing a find & replace after copying the forumla to update the sites I'm looking for.

    +Rep - thanks again

+ 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