+ Reply to Thread
Results 1 to 7 of 7

Sumproduct for 1 date and text condition

Hybrid View

  1. #1
    Registered User
    Join Date
    06-04-2012
    Location
    Sheffield, UK
    MS-Off Ver
    Excel 2003-2010
    Posts
    56

    Sumproduct for 1 date and text condition

    I am trying to pull statistics together from data that is entered through a user form.
    There will be multiple entries for each day and I want to total the results, an example of this is below:

    cell.png

    Date Called Before Caller Date Yes Customer
    01/07/2013 10:00 Yes Customer 01/07/2013 2 1
    01/07/2013 10:10 Yes Staff 02/07/2013 1 1
    01/07/2013 11:13 No Staff 03/07/2013 1 1
    02/07/2013 02:30 Yes Staff 04/07/2013 1 0
    02/07/2013 15:38 No Customer
    03/07/2013 13:00 Yes Customer
    04/07/2013 16:55 Yes Staff

    I am using the sumproduct formula: =SUMPRODUCT(--($A$2:$A$8>=E2+0)*($A$2:$A$8<=E3+0)*($B$2:$B$8="Yes"))
    which does seem to work, however when I get to the end of the list I get a problem as there is no next date. Rather than using >= and <= for the date, is there a way to have it so it is just = to a date?
    I may need to combine the criteria later on, ie on 01/07/13 how many staff called that have not called before (answer 1)

    If someone can provide me with a simpler sumproduct formula it would be greatly received.
    Last edited by JimmyG.; 07-22-2013 at 07:16 PM.

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Sumproduct for 1 date and text condition

    Same idea:

    =SUMPRODUCT(($A$2:$A$8=E3+0)*($B$2:$B$8="Yes"))
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Registered User
    Join Date
    06-04-2012
    Location
    Sheffield, UK
    MS-Off Ver
    Excel 2003-2010
    Posts
    56

    Re: Sumproduct for 1 date and text condition

    Hi JB, that is what I thought too but when I try it I get a 0 result even though there should be an answer. Any ideas?

  4. #4
    Registered User
    Join Date
    07-23-2013
    Location
    delhi
    MS-Off Ver
    Excel 2007
    Posts
    2

    Re: Sumproduct for 1 date and text condition

    =sumproduct((Range1= Criteria1)*1,(Range1= Criteria2)*1,(array1,array2))

    OK and Tested on multiple models

  5. #5
    Registered User
    Join Date
    06-04-2012
    Location
    Sheffield, UK
    MS-Off Ver
    Excel 2003-2010
    Posts
    56

    Re: Sumproduct for 1 date and text condition

    Hi Bharat, thank you for the reply however I can't seem o figure it out - what would I put in where it says array1,array2?

  6. #6
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Sumproduct for 1 date and text condition

    Ah, I see, your reference data has TIMES in it, the match date does not. Try this:

    =SUMPRODUCT((INT($A$2:$A$8)=INT(E3)+0)*($B$2:$B$8="Yes"))

  7. #7
    Registered User
    Join Date
    06-04-2012
    Location
    Sheffield, UK
    MS-Off Ver
    Excel 2003-2010
    Posts
    56

    Re: Sumproduct for 1 date and text condition

    Hi JB,
    Thanks for the update that works great.

    If you could, do you mind explaining the difference with TIMES and MATCH, also what the difference is with the -- and INT?

    Thank you


    Quote Originally Posted by JBeaucaire View Post
    Ah, I see, your reference data has TIMES in it, the match date does not. Try this:

    =SUMPRODUCT((INT($A$2:$A$8)=INT(E3)+0)*($B$2:$B$8="Yes"))

+ 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. [SOLVED] Need assistanct with sum formula based on a date as well a special text condition
    By lilsnoop in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 12-03-2012, 12:06 AM
  2. SUMPRODUCT condition ="*text*" not working
    By nfellen in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 07-26-2012, 08:31 PM
  3. Replies: 1
    Last Post: 05-19-2012, 02:54 AM
  4. Sumproduct - looking up date and text values
    By squire82 in forum Excel General
    Replies: 3
    Last Post: 11-04-2011, 08:32 AM
  5. get date from text & cell based on condition
    By tek9step in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-05-2011, 03:37 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