Need conditional formula

D

Dan Hale

I need a formula that will look in a cell that contains text and if that
text contains certain words the formula will return a value based on which
text it finds and example will be something like this:

The cell the formula looks at might contain the following:

Walgreens 1234 abc
CVS 5678 def
Target 9012 ghi
Babies R US 3456 jklmno

I need the formula to return a 60 if the cells contains WALGREENS OR CVS
return 120 if the cell contains Target or return 30 if the cell contains
Babies are us.

Any help would be greatly appreciated.

Thanks
 
C

Carim

Hi Dan,

Give it a try :

=IF(OR(COUNTIF(A1,"Walgreens*")=1,COUNTIF(A1,"CVS*")=1),60,IF(COUNTIF(A1,"Target*")=1,120,IF(COUNTIF(A1,"Babies*")=1,30,0)))

HTH
Cheers
Carim
 
B

Bob Phillips

=IF(OR(ISNUMBER(SEARCH("WALGREENS",E5)),ISNUMBER(FIND("CVS",E5))),60,
IF(ISNUMBER(SEARCH("TARGET",E5)),120,
IF(ISNUMBER(SEARCH("Babies",E5)),30,"")))

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)
 

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

Top