How to search by name and return what groups they reside in

Bones55

New Member
Joined
Feb 23, 2017
Messages
20
I have a spreadsheet with 20 different groups and each group has people assigned to them.


I would like to be able to search by typing their first name in a search box and have it return what group or groups they resides with. Any help would be appreciated.
 
Aladin,

How difficult would it be to place the formula on say sheet1 to extract the information from data on sheet3 and using Joshua as an example when the formula finds all the Joshua's on Sheet3 to show their full name and what group they belong too?


Book1
ABCDE
1AC_Region_DesksideAC_Region_EngineeringAC_Region_SecurityAC_TelecomAccounting_Systems
2Alphonso JohnsBarry PullmanAndre GiantAnabelle LinderBarbara Masters
3Anna SmithCarlos PerezCharles PowerDavid WestJoshua Everbridge
4Chin LeeEduardo GuzmanFancia SayJoshua EverbridgeMichele McEber
5Grant LindaElvis RocksHarry BrookMichele McEberThomas Hunter
6Jaycee SmithJair CarJeffie BenfordThomas Hefner
7Jose MoralJeffrey VansJon Michael VinceWilliam Person
8Joshua LinseedJohn GarveyJoshua Everbridge
9Martin RobertsJoshua BeechMichele McEber
10Michele McEberJoshua EverbridgeRichard Keifer Sullivan
11Nicholas WinterLewis BonafellaRoss Wheat
12Teresa LynchMichele McEberThanh Phenn
13Thomas HunterPaul RidderThomas Hefner
14Toshia MoriRenee RobersonWalter Coxboxer
15Robert BowersWilliam Person
16Thomas Hunter
17Vincent Price
18William Finland
Sheet1



Book1
AB
1Joshua
2AC_Region_DesksideJoshua Linseed
3AC_Region_EngineeringJoshua Beech
4AC_Region_EngineeringJoshua Everbridge
5AC_Region_SecurityJoshua Everbridge
6AC_TelecomJoshua Everbridge
7Accounting_SystemsJoshua Everbridge
8
Sheet3


In A2 of Sheet3 control+shift+enter, not just enter, and copy down:

=IFERROR(INDEX(Sheet1!$A$1:$E$1,SMALL(IF(ISNUMBER(SEARCH("|"&$A$1,"|"&Sheet1!$A$2:$E$18)),COLUMN(Sheet1!$A$1:$E$1)-COLUMN(INDEX(Sheet1!$A$1:$E$1,1,1))+1),ROWS(Sheet1!$1:1))),"")

In B2 of Sheet3 control+shift+enter, not just enter, and copy down:

=IF($A2="","",INDEX(Sheet1!$A$2:$E$18,SMALL(IF(ISNUMBER(SEARCH($A$1,INDEX(Sheet1!$A$2:$E$18,0,MATCH($A2,Sheet1!$A$1:$E$1,0)))),ROW(Sheet1!$A$2:$E$18)-ROW(Sheet1!$A$2)+1),COUNTIFS($A$2:A2,A2)),MATCH($A2,Sheet1!$A$1:$E$1,0)))
 
Upvote 0

Excel Facts

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number
First let me say you’re fantastic, your formulas worked great…I’m trying to adapt it to my second spreadsheet – the first formula is fine…I change the sheet name and where it searches to L122 and it works great…no issues, now when I change the second formula I’m getting #N/A or #Value ! I can get the formula to work if it’s in Column A and B, but not in K and L

L122 has the search box i.e. Joshua, L123 has this code and is working as expected.

=IFERROR(INDEX('Data Do not touch'!$B$2:$CW$2,SMALL(IF(ISNUMBER(SEARCH("|"&$L$122,"|"&'Data Do not touch'!$B$2:$CW$54)),COLUMN('Data Do not touch'!$B$2:$CW$2)-COLUMN(INDEX('Data Do not touch'!$B$2:$CW$2,1,1))+1),ROWS('Data Do not touch'!$1:1))),"")

K123 I’ve entered this formula to look at both L122 and L123 and can’t get it to work…what am I missing?

=IF($L123="","",INDEX('Data Do not touch'!$B$2:$CW$54,SMALL(IF(ISNUMBER(SEARCH($L$122,INDEX('Data Do not touch'!$B$2:$CW$54,0,MATCH($L123,'Data Do not touch'!$B$2:$CW$2,0)))),ROW('Data Do not touch'!$B$2:$CW$54)-ROW('Data Do not touch'!$L$123)+1),COUNTIFS($L$123:L123,L123)),MATCH($L122,'Data Do not touch'!$B$2:$CW$2,0)))
 
Upvote 0
Assuming that the data headers are in $B$1:$CW$1 of Data Do not touch...

L123 >>

=IFERROR(INDEX('Data Do not touch'!$B$1:$CW$1,SMALL(IF(ISNUMBER(SEARCH("|"&$L$122,"|"&'Data Do not touch'!$B$2:$CW$54)),COLUMN('Data Do not touch'!$B$1:$CW$1)-COLUMN(INDEX('Data Do not touch'!$B$1:$CW$1,1,1))+1),ROWS('Data Do not touch'!$1:1))),"")

K123 >>

=IF($L123="","",INDEX('Data Do not touch'!$B$2:$CW$54,SMALL(IF(ISNUMBER(SEARCH($L$122,INDEX('Data Do not touch'!$B$2:$CW$54,0,MATCH($L123,'Data Do not touch'!$B$1:$CW$1,0)))),ROW('Data Do not touch'!$B$2:$CW$54)-ROW('Data Do not touch'!$B$2)+1),COUNTIFS($L$123:L123,L123)),MATCH($L123,'Data Do not touch'!$B$1:$CW$1,0)))

You need to confirm these formulas with control+shift+enter...
 
Upvote 0
Again thank you...my data headers are not on the top row, but looking at that I was able to change $B$1:$CW$1 to $B$2:$CW$2 and this allowed the formula to work... Your expertise has been outstanding and I couldn't have accomplished this without your assistance...thank you once again.
 
Upvote 0

Forum statistics

Threads
1,215,066
Messages
6,122,948
Members
449,095
Latest member
nmaske

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