+ Reply to Thread
Results 1 to 4 of 4

Counting Unique Values Across 2 Columns

  1. #1
    Registered User
    Join Date
    06-12-2012
    Location
    Local Cluster
    MS-Off Ver
    Excel 2010
    Posts
    5

    Counting Unique Values Across 2 Columns

    This seems simple enough, but I can't seem to find anything. I have two columns, C and D, with first and last names in each one respectively. I would like to count the unique values across both columns. I.e., how many different people there are. I figured out how to do one column, but due to the fact that some people have the same first name and different last names (or vice-versa), this is not particularly useful. What's the best way to do this?
    Last edited by mrfloopa; 06-12-2012 at 02:36 PM.

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Counting Unique Values Across 2 Columns

    Assuming data is in A2:B100, for example, try:

    Please Login or Register  to view this content.
    confirmed with CTRL+SHIFT+ENTER not just ENTER.
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Registered User
    Join Date
    06-12-2012
    Location
    Local Cluster
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: Counting Unique Values Across 2 Columns

    Quote Originally Posted by NBVC View Post
    Assuming data is in A2:B100, for example, try:

    Please Login or Register  to view this content.
    confirmed with CTRL+SHIFT+ENTER not just ENTER.
    This seemed to work. It gave a value within the realm of possibility, but I am dealing with hundreds of names so it is hard to verify. I trust you, though, and it makes sense, so thanks a lot for the quick and accurate help!

  4. #4
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Counting Unique Values Across 2 Columns

    Another way, that doesn't involve Array formulas and is more efficient is to use a helper column... e.g. in C2

    =COUNTIFS(A$2:A2,A2,B$2:B2,B2)=1

    copied down

    then count the TRUE's

    =COUNTIF(C:C,TRUE)

    then numbers should match to the original formula and allow you to verify.

+ 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