If cell contains certain text, then return value

CRISTINA1128

New Member
Joined
Jun 21, 2016
Messages
9
Hello, I'm working in EXCEL 2016 and trying to create a formula where If cell contains certain text, then return value.

I have the text in column B and would like to create a formula that returns the values in column A.

Any help is greatly appreciated ;-)

[TABLE="class: grid, width: 500, align: left"]
<tbody>[TR]
[TD][/TD]
[TD]COLUMN A[/TD]
[TD]COLUMN B[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]PAK - FC[/TD]
[TD]PAUL[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]ANP - FC[/TD]
[TD]ANDY[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]HOU[/TD]
[TD]NALINI[/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]SUKHY - UK[/TD]
[TD]SUKHY[/TD]
[/TR]
</tbody>[/TABLE]
 

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.
Code:
=IF(SEARCH("???",B1)>0,A1,"TEXT NOT FOUND")

replace "???" with what you are looking for, you can reference the cell that has the value you are looking for too

you could write that formula in C1 and drag down.
 
Last edited:
Upvote 0
Thank you for your help - however, Column B has 4 different salesreps (their names are PAUL, ANDY, NALINI and SUKHY). And I want to create a formula that recognizes these names and return a value in Column A (their initials - like what I detailed in Column A).

I could do a search & replace....but I just thought I could create a formula to do this as well.

THANK YOU AGAIN! I love this forum and always recv such great advise/tips! :-)
 
Upvote 0
Thank you for your help - however, Column B has 4 different salesreps (their names are PAUL, ANDY, NALINI and SUKHY). And I want to create a formula that recognizes these names and return a value in Column A (their initials - like what I detailed in Column A).

I could do a search & replace....but I just thought I could create a formula to do this as well.

THANK YOU AGAIN! I love this forum and always recv such great advise/tips! :-)

You use combination of index and match then...

Code:
=INDEX(A1:A4,MATCH("PAUL",B1:B4,0))

this looks for the position of "PAUL" in B1:B4 and returns the value of the same position in A1:A4
 
Last edited:
Upvote 0

Forum statistics

Threads
1,223,275
Messages
6,171,127
Members
452,381
Latest member
Nova88

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