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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Finding a text string from an array in a cell value 1

Status
Not open for further replies.

RandDUser

Technical User
Feb 24, 2005
65
US
I have an array of text phrases (A1:A4).

I have another array of text phrases (B1:B4)

___A___ ____B_____ __C__
1 | Up | Northeast | T
2 | Down | Downward | T
3 | North | Up | T
4 | South | West | F

In C1, I want a formula that says, take the value in B1 and see if any of the text in B1 is a match in A1:A4. If so, return true, else false. So C1 = TRUE because "North" is in the array of A1:A4, and C4 = FALSE because "West" is not in the array.

I have tried using combinations of MATCH(), VLOOKUP(), FIND(), and SEARCH(), to no avail. Any suggestions?

Thanks!
 
Thanks for the reply. That does work if for C1 I put "=IF(ISERROR(FIND(A3,B1)),"False","True").

I tried "=IF(ISERROR(FIND(A1:A4,B1)),"False","True")", but that doesn't work either.

Any other thoughts? Thanks!
 
Try this array formula ... ( entered using Ctrl-Shift-Enter )
Code:
=SUM(IF(NOT(ISERROR(FIND($A$1:$A$4,B1))),1,0))>0
and copy down as required.

Remember to enter the formula using Ctrl-Shift-Enter. ( you will see curly brackets appear around the formula after you've done it )

Cheers, Glenn.

Did you hear about the literalist show-jumper? He broke his nose jumping against the clock.
 
Thank you GlennUK, that worked great, and because I'll probably use this formula again and again, 2 stars.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top