Results 1 to 5 of 5

COUNTIF vs COUNTIFS vs SUMPRODUCT

Threaded View

  1. #1
    Registered User
    Join Date
    05-27-2013
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    12

    COUNTIF vs COUNTIFS vs SUMPRODUCT

    So, I'm trying to count of the number of occurrences of text that happen between two dates among multiple sheets in a workbook, and I cannot get the correct number. I have dates in the E column of each worksheet, and the text I want to count is in column F. For the dates I want to limit, I have them in cells E5 and E6 on the same sheet as the formulas. I currently have the E5/E6 cells dated 01-01-05 and 28-05-13 (there are no dates that go back to 2005, I'm doing this to test the formulas for accurate results before I start limiting).

    If I use a COUNTIF, it returns 15. (expected)
    =COUNTIF(Sheet2!$F:$F,text)
    If I try to use a COUNTIFS to limit the date, it returns 0 even if I don't put the end date.
    =COUNTIFS(Sheet2!$F:$F,text,Sheet2!$E:$E,">="&$E$5)
    If I try a SUMPRODUCT from the start date, it returns the expected number if I don't put the end date. Which will return 0 if I do.
    =SUMPRODUCT((Sheet2!$F$3:$F$100 = text)*(Sheet2!$E3:$E$100 >= $E$5))-SUMPRODUCT((Sheet2!$F$3:$F$100 = text)*(Sheet2!$E3:$E$100 > $E$6))
    Is there something I'm missing that would cause both the COUNTIFS and SUMPRODUCT functions to return incorrect values? Any help is appreciated, thanks!
    Last edited by FASTiger; 05-27-2013 at 11:21 PM.

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