View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.misc
SteveG
 
Posts: n/a
Default Finding a text string w/in a Cell


I'm a little confused as to exactly what you are trying to do. Do you
mean that you want to look up the word in Column A in column B and
return it in column C? There are a couple of ways to do this that
should not require any cutting and pasting.

=IF(ISNUMBER(SEARCH(TRIM(A1),B1,1)),A1,"")

or

=MID(B1,SEARCH(TRIM(A1),B1,1),LEN(TRIM(A1)))

I used the TRIM function because if your data in A:A has any unseen
spaces at the end of the text, without it, the formulas will not return
the desired result.

Maybe I am not understanding completely?

Steve


--
SteveG
------------------------------------------------------------------------
SteveG's Profile: http://www.excelforum.com/member.php...fo&userid=7571
View this thread: http://www.excelforum.com/showthread...hreadid=521909