View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.misc
[email protected] bird_222@my-deja.com is offline
external usenet poster
 
Posts: 38
Default Comparing text in columns

On Apr 15, 6:55*pm, wrote:
On Apr 15, 3:53*pm, Ron Rosenfeld wrote:



On Fri, 15 Apr 2011 09:45:08 -0700 (PDT), wrote:
On Apr 15, 11:19 am, wrote:
I think I may be asking alot here, but here it goes. I need a formula
that will return 'true' if ANY of the words in one column are in the
second column. I plan on using this 'true' value in an 'if' function..


For example (the formula would be in column C):


Column A Column B Column C
Wile E. Coyote coyote true
Wile E. Coyote Wile true


I hope my example is clear. Can someone provide some guidance?


TIA


I need to shift gears here but unfortunately I can't edit my post. * I
want something like a 'vlookup' that matches any of the words in
column A with column B and returns column B. *Something like this:


=vlookup('any word in column A',column B,1,false)


It is not clear what you want to match. *Claus's response will return True if any of the words in A1 are found in B1 and can be easily modified to return the word, or FALSE if the word is not there. *Something like:


=if(ISNUMBER(SEARCH(B1,A1)),B1)


If you want to know if ANY word in column B (all the cells) matches ANY word in column A (all the cells), you will have multiple matches. *How do you want to handle that?


Perhaps you only want to compare the phrase in A1 with a list of words in column B, returning either the word in column B, or FALSE? *If that is the case, it makes more sense, but you still have to decide what you want to do in the event that multiple words in the list in column B are included in the Phrase in A1.


I just want to compare the phrase in one cell (A1 for example) to a
range of cells in column B (for example B1:B10) and wherever the match
is found return the text in the B cell. *With the list I am using
there shouldn't be any duplicates.

For example

Cell A1 * * * * * * * * * * * * * * * Column B * * * * * * * * Cell C1
(has formula)
Wile E. Coyote * * * * * * * * * *apple * * * * * * * * * * * *coyote
(the match was found in B5 and I want the formula to put the text in
the match cell here)
* * * * * * * * * * * * * * * * * * * * * blue
* * * * * * * * * * * * * * * * * * * * * cherry
* * * * * * * * * * * * * * * * * * * * * gun
* * * * * * * * * * * * * * * * * * * * * coyote


Well my sentence wrapped around. I want cell C1 that contains the
formula to display the text in whatever cell in column B where the
match occurred.