Help with Text search and returning cell ref in if statement

maximillianrg

Board Regular
Joined
Aug 7, 2014
Messages
74
Office Version
  1. 2016
Platform
  1. Windows
Hello Excel Masters

While Power Query with Fuzzy lookup is great for a lot of work I'm doing, I'm hoping for some help with a searching formula

Sheet 1 Cell A1 = "cat"
Sheet 2 Column A cells A1 - A2000 contain text that ranges from 1-15 words

In Sheet 1 cell A1 I'm looking for a formula that would do the following:

1. Search for the word in Sheet 1 cell A1 in Sheet 2 Column A
2. If no hits are found return 0
3. If more than one instance is found return "Multiple"
4. If only once instance is found return the cell reference that it was found in

Is that possible?
 

Excel Facts

Select all contiguous cells
Pressing Ctrl+* (asterisk) will select the "current region" - all contiguous cells in all directions.
Hi, Try this

Excel Formula:
=IF(COUNTIF(Sheet2!A1:A2000,"*"&A1&"*")=0,0,IF(COUNTIF(Sheet2!A1:A2000,"*"&A1&"*")=1,CELL("address",INDEX(Sheet2!A1:A2000,MATCH("*"&A1&"*",Sheet2!A1:A2000,0))),IF(COUNTIF(Sheet2!A1:A2000,"*"&A1&"*")>1,"Multiple")))
 
Upvote 0
Solution

Forum statistics

Threads
1,216,117
Messages
6,128,937
Members
449,480
Latest member
yesitisasport

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