Using the SEARCH function with mulitple criteria against one cell

Excel_VBA

New Member
Joined
Dec 19, 2009
Messages
42
Column A called Transactions which contain the following:
OUTBACK #8740 CHANTILLY VA
TROPICAL SMOOTHIE VA85 HERNDON VA
FLIPPIN PIZZA CHANTILLY VA

Column C called Lookup List has:
OUTBACK
TROPICAL SMOOTHIE
CHARLIE CHAING'S REST
BACKYARD GRILL
FLIPPIN PIZZA

All of these values line up on the same row starting with row #2. In column B, I am trying to figure out a formula which will pick up all values in column C, then use the SEARCH function on those values and look to the value in column A and see if one of the search values in column C appears in column A.

For example, in cell B2, I want to have a formula that considers all lookup values in column C, then look to cell A2 which has "OUTBACK #8740 CHANTILLY VA" and if OUTBACK appears in cell A2 (which it does), then the position number of OUTBACK would be returned.

I suppose an array formula is needed. I was trying to do something like:
=SEARCH(C2:C22,A2,1)

I get the #VALUE! error. I tried pressing Enter as well as Ctrl + Shift + Enter and I still get the same error.
 

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.

Forum statistics

Threads
1,224,586
Messages
6,179,711
Members
452,939
Latest member
WCrawford

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