Search in either of two columns and return multiple results

mackensteff

Board Regular
Joined
Feb 9, 2010
Messages
74
Office Version
  1. 365
Platform
  1. MacOS
Hello,

I have a feeling this should be easy, but in essence, I am trying to generate the bottom table using the top table. In the bottom table, I want to search by the name in the Mentor Row, using the top table Mentor 1 and Mentor 2 as the matching array, and return the mentees from the left-most column in the bottom table under the appropriate name. A bonus would be to create the Mentors row of names in the bottom table by pulling a unique list from both the Mentor 1 and Mentor 2 columns in the top table.

Thanks for taking a look!

MenteeDisciplinePositionMentor 1Mentor 2
Jack DoddChemTTTodd WaxmanNate Smith
Clark HillChemTTRyan HansenHenry Claude
Becky JensenChemNTTNate SmithTrish Stevens
Jim LundPhysTTZane BishopCade Potter
Beth BondChemTTRyan HansenAlbert Parsons
Tim RandallChemTTBen HavershamHenry Claude
Trish StevensChemNTTBen HavershamDavid Rossman
Kyle WrightPhysTTBen HavershamAlbert Parsons
Gale JohnsonChemTTDavid RossmanCade Potter
MentorsRyan HansenBen HavershamAlbert ParsonsHenry ClaudeTodd WaxmanNate SmithDavid RossmanCade PotterZane BishopTrish Stevens
MenteesClark HillTim RandallBeth BondClark HillJack DoddJack DoddTrish StevensJim LundJim LundBecky Jensen
Beth BondKyle WrightKyle WrightTim RandallBecky JensenGale JohnsonGale Johnson
Trish Stevens
 

Attachments

  • 1633542400701.png
    1633542400701.png
    44 KB · Views: 6

Excel Facts

Which Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.
What version of Excel are you using?

I suggest that you update your Account details (or click your user name at the top right of the forum) so helpers always know what Excel version(s) & platform(s) you are using as the best solution often varies by version. (Don’t forget to scroll down & ‘Save’)
 
Upvote 0
Thanks for the suggestion. I am on MacOS Catalina using Version 16.52 with a Microsoft 365 subscription.
 
Upvote 0
Thanks for that, how about
+Fluff 1.xlsm
ABCDEFGHIJK
1MenteeDisciplinePositionMentor 1Mentor 2
2Jack DoddChemTTTodd WaxmanNate Smith
3Clark HillChemTTRyan HansenHenry Claude
4Becky JensenChemNTTNate SmithTrish Stevens
5Jim LundPhysTTZane BishopCade Potter
6Beth BondChemTTRyan HansenAlbert Parsons
7Tim RandallChemTTBen HavershamHenry Claude
8Trish StevensChemNTTBen HavershamDavid Rossman
9Kyle WrightPhysTTBen HavershamAlbert Parsons
10Gale JohnsonChemTTDavid RossmanCade Potter
11
12MentorsRyan HansenBen HavershamAlbert ParsonsHenry ClaudeTodd WaxmanNate SmithDavid RossmanCade PotterZane BishopTrish Stevens
13Clark HillTim RandallBeth BondClark HillJack DoddJack DoddTrish StevensJim LundJim LundBecky Jensen
14Beth BondTrish StevensKyle WrightTim RandallBecky JensenGale JohnsonGale Johnson
15Kyle Wright
Lists
Cell Formulas
RangeFormula
B13:B14,G13:I14,F13,J13:K13,D13:E14,C13:C15B13=FILTER($A$2:$A$10,($D$2:$D$10=B12)+($E$2:$E$10=B12))
Dynamic array formulas.
 
Upvote 0
This works great to get the first row (13 in your example), but when I put it in row 14 of your example it just repeats the name, and doesn't select the next result.
 
Upvote 0
Just put the formula in B14 (with my example) & drag across, do not drag down.
 
Upvote 0

Forum statistics

Threads
1,214,651
Messages
6,120,744
Members
448,989
Latest member
mariah3

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