If Function

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I want to write a formula like this: if column D contains the word zebra in
any cell, then each corresponding cell in column A will say Stripe
Can this be done?
 
vacation said:
I want to write a formula like this: if column D contains the word zebra in
any cell, then each corresponding cell in column A will say Stripe
Can this be done?

Hi vacation

In A1 type =IF(D1="Zebra","Stripe","SomethingElse")

Copy down as necessary.

Regards

Steve
 
Thanks! That was fast. Its almost working. I neglected to say that the word
Zebra is part of a text string in the cell. I'm just looking for that word
and not the others. What do you suggest
 
If it is case-sensitive, use FIND(), otherwise use SEARCH()

IF(not(iserror(search(D1,"Zebra"))),"Stripe","SomethingElse")
 
The formula is producing the result SomethingElse for each cell in column
A...like its never seeing that Zebra is found in column D at all and
therefore never returns Stripe when it should.
 
Oops. Sorry about that..had some arguments reversed

=IF(NOT(ISERROR(SEARCH("Zebra",D84))),"Stripe","SomethingElse")
 
It works! Thank you!!!!

Duke Carey said:
Oops. Sorry about that..had some arguments reversed

=IF(NOT(ISERROR(SEARCH("Zebra",D84))),"Stripe","SomethingElse")
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top