Count Unique Names when in Two Colums

gkitt80

New Member
Joined
Aug 17, 2007
Messages
7
Hello All,

I need to count the number of times a unique name shows up in a table of data. The issue I am having is the names are split up into 2 columns, "LastName" and "FirstName." Obviously, some last names are very common, and thus if I only counted the number of unique last names I wouldn't get an accurate number. Any help would be much appreciated.
 

Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)

facethegod

Well-known Member
Joined
Aug 1, 2006
Messages
767
so if your first and last names are in to columns say A and B then in C

try this and drag down
Code:
=A1&B1

then in D1 try this and confirm w/ ctrl + shift + Enter, not just enter

Code:
=SUM(1/COUNTIF(C1:C9,C1:C9))
 
Upvote 0

Aladin Akyurek

MrExcel MVP
Joined
Feb 14, 2002
Messages
85,210
Hello All,

I need to count the number of times a unique name shows up in a table of data. The issue I am having is the names are split up into 2 columns, "LastName" and "FirstName." Obviously, some last names are very common, and thus if I only counted the number of unique last names I wouldn't get an accurate number. Any help would be much appreciated.

Given A2:B7...

Control+shift+enter:

Code:
=SUM(IF(FREQUENCY(IF($B$2:$B$7<>"",
                   MATCH("~"&$A$2:$A$7&"-"&$B$2:$B$7,
                              $A$2:$A$7&"-"&$B$2:$B$7&"",0)),
                   ROW($B$2:$B$7)-ROW($B$2)+1),1))
 
Upvote 0

Forum statistics

Threads
1,191,166
Messages
5,985,050
Members
439,935
Latest member
Monty238

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top