View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.misc
Elaine
 
Posts: n/a
Default Find part of a word in cell

Thank you, Duke! I hope that you don't mind if I have a follow-up question.
You answered the question I have but I was just trying to play with your
formula and couldn't get this.

If I was looking for two terms -- 'book' and 'paper' how would I amend the
formula that you have provided me. I need help in two areas:

If either one of 'paper' or 'book' was contained in B12, D12 should get the
code from c12.

Second D12 should get the code from C12 only if BOTH words are in B12.

Thanks again and I hope that you don't mind answering these two questions as
I am it will come up sooner or later.

"Duke Carey" wrote:

try

=IF(ISNUMBER(SEARCH("book",B12,1)),C12,0)

"Elaine" wrote:

In col B I have some entries many of which have the word 'book' in some form
-- eg. notebook or bookmark.

In col C I have some numeric codes -- 1, 2, 3 etc.

If a cell in Col B contains the word 'book' I would like in Col D to show
what is in Col C; if the cell in Col B does not contain the word 'book', I
would like to put a 0 (zero) in Col D.

Thanks for your help!