+ Reply to Thread
Results 1 to 2 of 2
  1. #1
    Forum Contributor tangcla's Avatar
    Join Date
    06-04-2008
    Location
    Melbourne, Australia
    MS-Off Ver
    2003, 2010
    Posts
    104

    SUMPRODUCT to count unique values AND more criteria...?

    I am looking to use SUMPRODUCT on a two-column analysis to return a count of unique sessions in column B, on a given date (column A).

    How would I be able to do this?

    My first idea was to concatenate column A and column B in column C, and by doing so I could count all unique sessions in total, BUT I couuldn't seem to be able to take just one days' worth of sessions.

    =SUMPRODUCT(((C5:C14<>"")/COUNTIF(C5:C14,C5:C14&"")))

  2. #2
    Forum Moderator DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Suffolk, UK
    MS-Off Ver
    2002, 2007 & 2010
    Posts
    21,379

    Re: SUMPRODUCT to count unique values AND more criteria...?

    If you change your first condition such that it checks the date you should find you get what you want...

    Code:
    =SUMPRODUCT(--($A$5:$A$14=$C$1),1/COUNTIF($C$5:$C$14,$C$5:$C$14&""))
    where C1 holds specific date of interest... and C5 etc are a concatenation of A&B

    you could use a FREQUENCY Array if you prefer to avoid use of C

    Code:
    =SUM(IF(FREQUENCY(IF($A$5:$A$14=$C$1,MATCH($B$5:$B$14,$B$5:$B$14,0)),ROW($B$5:$B$14)-ROW($B$5)+1)>0,1))
    confirmed with CTRL + SHIFT + ENTER

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.2.0