Any parts of the word

  • Thread starter Thread starter RayD
  • Start date Start date
R

RayD

Hello everyone,

I am trying to build a formula to check cell C:14 for any occurrence
of the word "pepsi" if found put the contents of cell D:14 in cell
H:14. So the formula will go in cell H:14 and I will copy down.

Any help will be appreciated
 
In cell H14 enter =IF(C14="pepsi",D14,"")
Cell D14 has =IF(C14="pepsi","Cell C14 has Pepsi in it.","") in it.
HTH
 
Thanks for the reply

Cell C14 has a sentence of 4 or 5 words in it. I am trying to pick-out
the word "pepsi" from the sentence. If found put the contents of cell
D14 in Cell H14. I am probably not explaining this correctly. I will
keep trying though.

If the single word "pepsi" is in C14 then your suggestion works.
 
=IF(ISERR(SEARCH("pepsi",C14)="#VALUE!"),"",IF(SEARCH("pepsi",C14)>0,D14,"")
)

This should keep H14 blank is C14 is either blank or has text without
"pepsi" in it........

Vaya con Dios,
Chuck, CABGx3
 
Replace D14 with =COUNTIF(C14:C14,"*pepsi*") <<< If it yeilds "1" then
True
If D14 yeilds 0, False. Replace H14 with =IF(D14=1,C14,"");
Better?
HTH
 
You could try:

=IF(ISERR(SEARCH("pepsi",C14)),"",D14)
--
HTH,

RD
==============================================
Please keep all correspondence within the Group, so all may benefit!
==============================================
 
Hi,

try the "search" function:

in H14, type: =if(iserror(search("pepsi",c14,1)),"",d14)

This formula will leave h14 blank if it doesn't find the
word pepsi. if it does find pepsi. it should copy d14 into
h14.
Hope this works.
Mehmet
-----Original Message-----
Thanks for the reply

Cell C14 has a sentence of 4 or 5 words in it. I am trying to pick-out
the word "pepsi" from the sentence. If found put the contents of cell
D14 in Cell H14. I am probably not explaining this correctly. I will
keep trying though.

If the single word "pepsi" is in C14 then your suggestion works.
 
Back
Top