Return value from another cell when value(s) is present as part of a string

Georgez

New Member
Joined
Jun 10, 2016
Messages
8
Office Version
  1. 365
Platform
  1. Windows
Hello Experts.
I appreciate any help you can provide. I am trying to list users Secretaries in a spreadsheet
I have a spreadsheet containing user information (initials, name, title etc). If the user is a Secretary, their title includes the initials of the people they work for separated by a comma.
I need to generate the Secretaries initials against the users based on the presence of the users initials in the Secretaries titles. NB some users have more than one secretary.
I am able to use INDEX / MATCH but can't work out how to do this in this scenario, when the users initials are part of a string, and have possible multiple matches.
I have attached an image of some dummy records to illustrate. I am trying to generate the information held in column G.
Many thanks for any guidance.
 

Attachments

  • Sample.JPG
    Sample.JPG
    57 KB · Views: 19
  • Sample.JPG
    Sample.JPG
    57 KB · Views: 19
I have one more question using the same example if I may... Is it possible to return the PA's name held in column D where there are multiple entries? I can use the following against the results generated using the above formula

=INDEX(D:D,MATCH(G2,A:A,0))

but this won't work where there are two PAs. Is there an easy way to do this? And apologies for asking an additional question on a solved post.
 
Upvote 0

Excel Facts

Using Function Arguments with nested formulas
If writing INDEX in Func. Arguments, type MATCH(. Use the mouse to click inside MATCH in the formula bar. Dialog switches to MATCH.
How about
Excel Formula:
=TEXTJOIN(" / ",TRUE,FILTER($D$2:$D$9,ISNUMBER(SEARCH(" "&A2&","," "&$F$2:$F$9&",")),""))
 
Upvote 0

Forum statistics

Threads
1,221,526
Messages
6,160,340
Members
451,637
Latest member
hvp2262

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