Unique within Unique

alibini

New Member
Joined
Mar 15, 2020
Messages
30
Office Version
  1. 365
Platform
  1. Windows
I have a list of unique names. If the first name is present with BOTH "Smith" and "Jones", I want only First Name & "Smith", otherwise don't change. In the below this would be true for John.
Is there an "=Unique(..... " solution for this?

Example Starting List:

First NameLast Name
JohnSmith
MikeJones
JohnJones
BillShort
JaneJones
BillSmith


Desired Outcome:


First NameLast Name
JohnSmith
MikeJones
BillShort
JaneJones
BillSmith
 

Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.
I don't know about a Unique() solution, but the following might give you the same desired end result (given that the first row will always be the same in both lists)

Book1
ABCDE
1First NameLast NameFirst NameLast Name
2JohnSmithJohnSmith
3MikeJonesMikeJones
4JohnJonesBillShort
5BillShortJaneJones
6JaneJonesBillSmith
7BillSmith
8
Sheet1
Cell Formulas
RangeFormula
D2:E2D2=A2:B2
D3:E6D3=FILTER($A$3:$B$7,$A$3:$A$7<>$D$2,"")
Dynamic array formulas.
 
Upvote 0
Try:
Book1
ABCDE
1First NameLast NameFirstlast
2JohnSmithJohnSmith
3MikeJonesMikeJones
4JohnJonesBillShort
5BillShortJaneJones
6JaneJonesBillSmith
7BillSmith
Sheet1
Cell Formulas
RangeFormula
D2:E6D2=LET(a,A2:A7,b,B2:B7,UNIQUE(HSTACK(a,IF(BYROW(COUNTIFS(a,a,b,{"Smith","Jones"}),SUM)=2,"Smith",b))))
Dynamic array formulas.
 
Upvote 0

Forum statistics

Threads
1,225,315
Messages
6,184,239
Members
453,223
Latest member
Ignition04

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