+ Reply to Thread
Results 1 to 4 of 4

Count unique occurrences, segmented by two columns

  1. #1
    Registered User
    Join Date
    05-22-2013
    Location
    New York, NY
    MS-Off Ver
    Excel 2010
    Posts
    2

    Count unique occurrences, segmented by two columns

    For this problem, I have three columns: User (column A), Company (B), and Outreach type (C). I wish to count unique occurrences of the values in column B for each combination of columns A and C. '

    Column A example values: person1, person2, person3
    Column B example values: Acme, Walmart, Microsoft
    Column C: Connected, Unconnected

    I need to count how many "connected" rows person1 has, without double-counting column B. Any ideas?

  2. #2
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,446

    Re: Count unique occurrences, segmented by two columns

    Attach a sample workbook. Make sure there is just enough data to make it clear what is needed. Include BEFORE/AFTER sheets if needed to show the process you're trying to complete or automate. Remember to desensitize the data.

    Click on GO ADVANCED and use the paperclip icon to open the upload window.

    View Pic

  3. #3
    Registered User
    Join Date
    05-22-2013
    Location
    New York, NY
    MS-Off Ver
    Excel 2010
    Posts
    2

    Re: Count unique occurrences, segmented by two columns

    sample workbook.xlsx

    Thanks!

  4. #4
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Count unique occurrences, segmented by two columns

    Try this...

    Enter this array formula** on the After sheet in cell B4:

    =SUM(IF(FREQUENCY(IF(before!$A$2:$A$14=$A4,IF(before!$C$2:$C$14=B$3,MATCH(before!$B$2:$B$14,before!$B$2:$B$14,0))),ROW(before!$B$2:$B$14)-ROW(before!B$2)+1),1))

    ** array formulas need to be entered using the key
    combination of CTRL,SHIFT,ENTER (not just ENTER).
    Hold down both the CTRL key and the SHIFT key
    then hit ENTER.

    Copy across to C4 then down as needed.
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

+ 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