Search a cell against a range to see if a value from the range is present and if so, return that value

mdsurf

New Member
Joined
Aug 1, 2017
Messages
22
Office Version
  1. 2016
Platform
  1. MacOS
Hi everyone! I'm trying to search a cell against a range to see if a value from the range is present and if so, return that value:

Example:
Cells To Search For ValueEquation to search cells agains Range
This is my new car for the yearnew car
Did she buy the house for her familybuy the house
What time is the doctors appointment in the citydoctors appointment

Range
doctors appointment
buy the house
new car


Basically what I want to do in the second column is have an equation that searches the first column to see if a value from the range is present and if so, return that value.

Any help is greatly appreciated!
 

Excel Facts

Move date out one month or year
Use =EDATE(A2,1) for one month later. Use EDATE(A2,12) for one year later.
My solution uses an array formula.
Excel Formula:
=CONCAT(IF(ISERROR(FIND($A$7:$A$9,A2)),"",MID(A2,FIND($A$7:$A$9,A2),LEN($A$7:$A$9))))
This is an array formula. After typing in the formula, do not hit ENTER--hit CTRL+SHIFT+ENTER. You have done it correctly if the formula in the formula box has {braces} around it. You cannot type in the braces; they are just an indicator that it is an array formula.
 
Upvote 0
Hi Jeff, thank you so much for helping me out with this. Do you know if it's possible to do it without VBA? I've never used VBA before so it might be a bit above my skill level so wondering if there's another way.

Either way I very much appreciate your time / help on this.

Thank you!
 
Upvote 0
Hi,

Another formula solution:

Book3.xlsx
AB
1Cells To Search For ValueEquation to search cells agains Range
2This is my new car for the yearnew car
3Did she buy the house for her familybuy the house
4What time is the doctors appointment in the citydoctors appointment
5
6Range
7doctors appointment
8buy the house
9new car
Sheet972
Cell Formulas
RangeFormula
B2:B4B2=IFERROR(LOOKUP(2,1/SEARCH(A$7:A$9,A2),A$7:A$9),"")
 
Upvote 0

Forum statistics

Threads
1,214,385
Messages
6,119,205
Members
448,874
Latest member
Lancelots

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