List of distinct names

Antonio B

New Member
Joined
Oct 25, 2024
Messages
1
Office Version
  1. 2016
Platform
  1. Windows
Hi,
I have names in colum A and surnames in column B and want list of distinct names and surnames in collumns C and D.
My excel is 2016 and I need solution with formula (INDEX, MATCH, COUNTIF(S) and similar).
My data are in columns A and B, result in columns C and D.


ABCD
First NameLast NameFirst NameLast Name
RonnieAndersonRonnieAnderson
RobertJonesRobertJones
SallyBrookeSallyBrooke
DavidWhiteDavidWhite
RonnieAndersonMattiasWaldau
MattiasWaldauRobertBrooke
RobertBrookeSallyAnderson
DavidWhite
RobertJones
RobertJones
SallyAnderson

Thank you.
 

Excel Facts

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).
Power Query would be easier
 
Upvote 0
If you do not insist on the output as depicted above then you could e.g. use:

Excel Formula:
=IF(COUNTIFS(A$2:A2,A2,B$2:B2,B2)=1,A2,"")

Excel Formula:
=IF(COUNTIFS(A$2:A2,A2,B$2:B2,B2)=1,B2,"")
 
Upvote 0
Welcome to the MrExcel board!

Try this formula in C2, copied across and down

24 10 27.xlsm
ABCD
1First NameLast NameFirst NameLast Name
2RonnieAndersonRonnieAnderson
3RobertJonesRobertJones
4SallyBrookeSallyBrooke
5DavidWhiteDavidWhite
6RonnieAndersonMattiasWaldau
7MattiasWaldauRobertBrooke
8RobertBrookeSallyAnderson
9DavidWhite  
10RobertJones  
11RobertJones  
12SallyAnderson  
Unique names
Cell Formulas
RangeFormula
C2:D12C2=IFERROR(INDEX(A:A,AGGREGATE(15,6,ROW(A$2:A$12)/((MATCH($A$2:$A$12&"|"&$B$2:$B$12,$A$2:$A$12&"|"&$B$2:$B$12,0)=(ROW(A$2:A$12)-ROW(A$2)+1))*(ISERROR(MATCH($A$2:$A$12&"|"&$B$2:$B$12,$C$1:$C1&"|"&$D$1:$D1,0)))),1)),"")
 
Upvote 0

Forum statistics

Threads
1,223,248
Messages
6,171,021
Members
452,374
Latest member
keccles

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
Back
Top