Pull unique values based on a different set of unique values (No macro)

StewCrew

New Member
Joined
May 11, 2019
Messages
2
I am trying to create a list of unique values that relate to another list of unique values.

Column A has a list of managers and column B has a list of supervisors that report to the manager in column A. There will be multiple supervisors that report to a mange, but no 1 supervisor will report to more that 1 manager. I am trying to create a formula that will be able to simplify this data, so that if a supervisor quits and another person gets hired, it will auto populate the change. An example below of what I mean

A B
1 Manager Name Supervisor Name

2 Fred Couple Mark Coghlan

3 Chad Porky Patrick O'Connor

4 Shakra Dupti Mitch McConnell

5 Shakra Dupti Mark Masters

6 Chad Porky Glenn Peach

So i Can simplify the list of managers in column A in lets say column D with the below array formula

{=IFERROR(INDEX($A$2:$A$50,MATCH(0,COUNTIF($D$1:D1,$A$2:$A$50),0)),"")}

But how can I do something similar in column E for the supervisor so that in the end I can get a sheet that would look like this

D E
1 Manager Name Supervisor Name

2 Fred Couple Mark Coghlan

3 Chad Porky Patrick O'Connor

4 Glenn Peach

5 Shakra Dupti Mitch McConnell

6 Mark Masters

Thanks in advance
 

Excel Facts

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple
Welcome to the Board.

Something like this?

Excel 2012
ABCDE
1Manager NameSupervisor NameManager NameSupervisor Name
2Fred CoupleMark CoghlanFred CoupleMark Coghlan
3Chad PorkyPatrick O'ConnorChad PorkyPatrick O'Connor
4Shakra DuptiMitch McConnellGlenn Peach
5Shakra DuptiMark MastersShakra DuptiMitch McConnell
6Chad PorkyGlenn PeachMark Masters
7

<tbody>
</tbody>
Sheet4

Array Formulas
CellFormula
D2{=IF(ROWS($D$2:$D2)=SUM(IF($D$1:$D1="",0,COUNTIF($A$1:$A$50,$D$1:$D1))),IFERROR(INDEX($A$1:$A$50,SMALL(IF($A$1:$A$50<>"",IF(COUNTIF($D$1:$D1,$A$1:$A$50)=0,ROW($A$1:$A$50))),1)),""),"")}
E2{=IFERROR(INDEX($B$1:$B$50,SMALL(IF($A$1:$A$50=LOOKUP(2,1/($D$1:$D2<>""),$D$1:$D2),ROW($A$1:$A$50)),ROW(D2)-LOOKUP(2,1/($D$1:$D2<>""),ROW($D$1:$D2))+1)),"")}

<tbody>
</tbody>
Entered with Ctrl+Shift+Enter. If entered correctly, Excel will surround with curly braces {}.
Note: Do not try and enter the {} manually yourself

<tbody>
</tbody>




<tbody>
</tbody>



This is also quite easy to do with a Pivot Table. Select your table (A1:B50), go to the Insert tab, click Pivot Table, click OK on the next form. Then from the Pivot Table Fields box on the right, drag both the Manager Name and the Supervisor name down to the Rows box.
 
Last edited:
Upvote 0
is that what you want?

ManagerSupervisor
Craig LeeboshAndrew Szelemej
Craig LeeboshBrent Wilks
Craig LeeboshChad Sach
Craig LeeboshGlenn Kowalski
Craig LeeboshJordan Stevenson
Craig LeeboshJoshua Cherry
Craig LeeboshSandy Johnston
Craig LeeboshShane Brydges
Craig LeeboshSheldon Cameron
Devon PollardAkeem Brown
Devon PollardAndrew Walker
Devon PollardBryce Cale
Devon PollardDenis Ouellette
Devon PollardDylan Johnstone
Devon PollardJay_Cr Derrington
Devon PollardNorman Smyth
Devon PollardRick Stephens
Devon PollardRyan Huson
Devon PollardSean St. Amanad
Devon PollardSonja Nordman
Dominic MarleauFrederic Foisy
Dominic MarleauGeoffrey Paquette
Dominic MarleauJean-Francois Alarie
Dominic MarleauJosee Pelletier
Dominic MarleauJustin Schmid
Dominic MarleauMarie-Helene Fortier
Dominic MarleauNathalie Perron
Dominic MarleauNicholas Dubois
Dominic MarleauRae-Anne Davidson
Dominic MarleauYasmine Sayegh
Luke WasneyBen Spyker
Luke WasneyBill Keller
Luke WasneyChris Butler
Luke WasneyClayton Nakano
Luke WasneyEsteban Dominguez Londono
Luke WasneyGreg Foreman
Luke WasneyLuke Wasney
Luke WasneyMarc Edgett
Luke WasneyPatrick Melvin
Luke WasneySteve Okrainetz
Luke WasneyTroy Kaczynski
Luke WasneyWendy Lefebvre
Melissa MooreGarret Elmes
Melissa MooreHeidi Harriss
Melissa MooreJason Marcone
Melissa MooreKylene Tyler
Melissa MooreMelissa Moore
Melissa MooreMichelle Andreacchio
Melissa MoorePaul Walton
Melissa MooreRebecca Carrique
Melissa MooreRobert Csabai
Melissa MooreTimothy Ansdell
Roy LathamAlan Nolan
Roy LathamAnthony Lemoine-Hoefsmit
Roy LathamDave Johnson
Roy LathamDebbie Macdougall
Roy LathamJohn Gibson
Roy LathamJordan Lee
Roy LathamJustin Ryan
Roy LathamLuc Chenier
Roy LathamLuc Jolivet
Roy LathamPascal Chartrand
Shannon DoucetteAnthony Sebastian
Shannon DoucetteBrian Giles
Shannon DoucetteGlenn Peach
Shannon DoucetteKrista Hamilton
Shannon DoucetteMark Hughes
Shannon DoucetteMelanie Asselin
Shannon DoucetteMitch Getson
Shannon DoucetteSarah Lightbody
Shannon DoucetteSaralyn Williams
Thomas BruceBrian Devine
Thomas BruceGeorge Harrison
Thomas BruceGregory Waltham
Thomas BruceJason Leonov
Thomas BruceJohn Devander Schueren
Thomas BruceKevin_Cr Ford
Thomas BruceMichael Ostien
Thomas BruceTeresa Ecclestone
 
Last edited:
Upvote 0
It's possible that you can get formulas to create the lists you want. However, when you have lists of that size they formulas will take quite a while to calculate. You're better off with a macro solution, or Power Query, or even the built-in Sort tool (copy columns A:B, paste to D:E, select the sort tool > Custom sort > by columns D:E. You can even use Conditional Formatting to hide multiple instances of the same name in column D). Regardless of which method you want to calculate your list, please respond to Sandy's question about how you want the results to look.
 
Upvote 0

Forum statistics

Threads
1,215,346
Messages
6,124,417
Members
449,157
Latest member
mytux

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