Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Find Specific Text Within Cell Range

Status
Not open for further replies.

bigmerf

MIS
Oct 4, 2002
247
US
I'm looking for a way to search through a range of cells and populate another cell with that same data if specific text is found.

I've used this code to search a specific cell for contained text and it works great. However, I'm having trouble searching a RANGE of cells using the same logic.

See below for the logic that works when searching 1 cell for specific data:
Code:
=IF(ISNUMBER(SEARCH("AA",B2)),"OK","")

Now, when I change my search criteria from B2 to a range, say B2:B40, I get no results:
Code:
=IF(ISNUMBER(SEARCH("AA",B2:B40)),"OK","")

Do I need to search through a range of cells differently so that I get the correct result to show? Any help would be great!

 
Don't understand your formula whatsoever.

Anyway, for the second formula to work, you would need to press CTRL/SHIFT/ENTER after typing the formula.

You say the formula works. In my opinion it should never work; but, I have been wrong before.

A man has only two choices: He can be right or he can be happy.
 
You can use wildcards within CountIf.

[tab][COLOR=blue white]=if(countif(B2:B40, "*AA*")>0, "OK", "")[/color]

[tt][blue]-John[/blue][/tt]
[tab][red]The plural of anecdote is not data[/red]

Help us help you. Please read FAQ 181-2886 before posting.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top