Search Cell For A Value and Returning Another Value

mdsurf

New Member
Joined
Aug 1, 2017
Messages
22
Office Version
  1. 2016
Platform
  1. MacOS
Hi there, I have a list of peoples names and I want to search a bunch of cells and when someones name is present return a specific value. Let me explain below:

TAB1
NameJobs
Sarah SmithCook
John DoeBar Back
Erin LinkWaitress
Mark WallManager


I then want to search for those names in a column and return the job if the name is found in the cell. The cells will have additional text though so it will have to be a partial match.

TAB2
Text to search for NameIf Name present return Jobs and where I need help writing excel formula
part time, Sarah Smith, weekendsCook
full time, Mark Wall, salaried, on dutyManager
Erin Link, new hire, full time, week, morning shiftsWaitress
part time, summer season, Josh Robinson, salaryN/A

As you can see, trying to search to see if a name is present in a cell and if it is, return the job associated with the name. Any help is much appreciated, thank you!
 

Excel Facts

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.
Hi Mdsurf,

Does this do what you want?

Mdsurf3.xlsx
AB
1NameJobs
2Sarah SmithCook
3John DoeBar Back
4Erin LinkWaitress
5Mark WallManager
6
TAB1


Mdsurf3.xlsx
AB
1Text to search for NameIf Name present return Jobs and where I need help writing excel formula
2part time, Sarah Smith, weekendsCook
3full time, Mark Wall, salaried, on dutyManager
4Erin Link, new hire, full time, week, morning shiftsWaitress
5part time, summer season, Josh Robinson, salaryN/A
6 
TAB2
Cell Formulas
RangeFormula
B2:B6B2=IF(A2="","",IFERROR(INDEX('TAB1'!$B$2:$B$9999,AGGREGATE(15,6,ROW('TAB1'!$A$2:$A$9999)-ROW('TAB1'!$A$1)/(('TAB1'!$A$2:$A$9999<>"")*(ISNUMBER(SEARCH('TAB1'!$A$2:$A$9999,A2)))),1)),"N/A"))
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

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