+ Reply to Thread
Results 1 to 6 of 6

Using SUMPRODUCT to count unique numbers within a date range

Hybrid View

was Using SUMPRODUCT to count... 02-23-2005, 06:21 PM
Domenic Try the following... ... 02-24-2005, 09:20 AM
was Thank you Domenic 02-24-2005, 01:46 PM
was Help please a little problem 02-24-2005, 05:41 PM
Domenic Since Column B contains or... 02-24-2005, 06:38 PM
was Thank you Domenic 02-28-2005, 01:51 PM
  1. #1
    Registered User
    Join Date
    02-21-2005
    Posts
    15

    Help please a little problem

    The formula I tried does not give the correct count. I manualy counted the unique numbers for Jan. It was 29 the formula returned 24. Feb. was 33 the formula returned 28. They are both 5 off. Does anyone have an idea what is wrong.

    SUM(IF(FREQUENCY(IF((LIST!B5:B318<>"")*(LIST!A5:A318>=DATE(2005,1,1))*(LIST!A5:A318<=DATE(2005,1,31)),LIST!B5:B318,""),IF((LIST!B5:B318<>"")*(LIST!A5:A318>=DATE(2005,1,1))*(LIST!A5:A318<=DATE(2005,1,31)),LIST!B5:B318,""))>0,1,0))

    Also some of the number sequences in column B start with the letters EC. Non of them are counted either.

    I sure would appreciate any help given.
    Last edited by was; 02-24-2005 at 06:19 PM.

  2. #2
    Forum Expert
    Join Date
    06-18-2004
    Location
    Canada
    MS-Off Ver
    Office 2016
    Posts
    1,474
    Since Column B contains or includes alphanumeric values, the formula would have to change to the following...

    =SUM(IF(FREQUENCY(IF((LIST!B5:B318<>"")*(LIST!A5:A318>=DATE(2005,1,1))*(LIST!A5:A318<=DATE(2005,1,31)),MATCH(LIST!B5:B318,LIST!B5:B318,0),""),IF((LIST!B5:B318<>"")*(LIST!A5:A318>=DATE(2005,1,1))*(LIST!A5:A318<=DATE(2005,1,31)),ROW(INDIRECT("1:"&ROWS(LIST!B5:B318))),""))>0,1,0))

    ...confirmed with CONTROL+SHIFT+ENTER, not just ENTER.


    Also, it's possible that your cells are not formatted the same. Try the following...

    =SUMPRODUCT(--(ISNUMBER(A5:A318)))=COUNTIF(A5:A318,"<>")

    and

    =SUMPRODUCT(--(ISNUMBER(B5:B318)))=COUNTIF(B5:B318,"<>")

    If either of these formulas return FALSE, your cells are not formatted the same. If this is the case, make them the same by doing the following...

    a) Select an empty cell

    b) Edit > Copy

    c) Select your data

    d) Edit > Paste Special > Add > OK

    Hope this helps!

    Quote Originally Posted by was
    The formula I tried does not give the correct count. I manualy counted the unique numbers for Jan. It was 29 the formula returned 24. Feb. was 33 the formula returned 28. They are both 5 off. Does anyone have an idea what is wrong.

    SUM(IF(FREQUENCY(IF((LIST!B5:B318<>"")*(LIST!A5:A318>=DATE(2005,1,1))*(LIST!A5:A318<=DATE(2005,1,31)),LIST!B5:B318,""),IF((LIST!B5:B318<>"")*(LIST!A5:A318>=DATE(2005,1,1))*(LIST!A5:A318<=DATE(2005,1,31)),LIST!B5:B318,""))>0,1,0))

    Also some of the number sequences in column B start with the letters EC. Non of them are counted either.

    I sure would appreciate any help given.
    Last edited by Domenic; 02-24-2005 at 07:14 PM.

  3. #3
    Registered User
    Join Date
    02-21-2005
    Posts
    15

    Thank you Domenic

    All is right with the world now! I never would have gotten this done without your help. Thank you very much.

+ 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