SEARCH IF

  • Thread starter Derek Y via OfficeKB.com
  • Start date
D

Derek Y via OfficeKB.com

I want a function that can do this:

IF O2 CONTAINS "ABC" AND "DEF" THEN ABC/DEF, IF O2 CONTAINS ABC and NOT DEF
THEN "ABC", etc etc

is this pssible with IF(search(???)
 
D

Derek Y via OfficeKB.com

Derek said:
I want a function that can do this:

IF O2 CONTAINS "ABC" AND "DEF" THEN ABC/DEF, IF O2 CONTAINS ABC and NOT DEF
THEN "ABC", etc etc

is this pssible with IF(search(???)


I know i wasn't very specific but if you can help with this i will be able to
figure out the rest for my more complicated function.
 
D

Derek Y via OfficeKB.com

So far this is the best i can come up with.....


=IF(ISNUMBER(AND(FIND("*VA*",O2),FIND("*FHA*",O2))),"something",IF(ISNUMBER
(FIND("*VA*",O2),VA, etc etc)

but this doesn't work
 
D

Derek Y via OfficeKB.com

YAY I GOT IT....

=IF(AND(ISNUMBER(FIND("FHA",O2)),ISNUMBER(FIND("VA",O2))),"something",
"something else")

thanks anyways
 
D

Derek Y via OfficeKB.com

gosh i feel so smart when i have a formula like this...

=IF(AND(ISNUMBER(SEARCH("FHA",O2)),ISNUMBER(SEARCH("VA",O2))),"FHA/VA",IF
(ISNUMBER(SEARCH("FHA",O2)),"FHA",IF(ISNUMBER(SEARCH("VA",O2)),"VA",IF(OR
(ISNUMBER(SEARCH("conforming",O2)),ISNUMBER(SEARCH("zero",O2))),"NON_CON",IF
(OR(ISNUMBER(SEARCH("GOVT",O2)),ISNUMBER(SEARCH("30K",O2))),"FHA/VA","CONV")))
))

hehehe like i actually accomplished something today
 
S

Sandy Mann

FIND is case sensitive, you may be better off with SEARCH:

=IF(AND(ISNUMBER(SEARCH({"FHA","VA"},O2))),"something","something else")

--
HTH

Sandy
(e-mail address removed)
Replace@mailinator with @tiscali.co.uk
 

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