Code Help

  • Thread starter Thread starter DaveB
  • Start date Start date
D

DaveB

Just need some help finishing this code...thank you! DaveB

=IF(ISERR(FIND("INC",$A1)),IF(AND(ISERR(FIND
("SOCIETY",$A1)),ISERR(FIND("FOUNDATION",$A1))),IF(ISERR
(FIND("UNIVERSITY",$A1)),"","ACAD"),"ASSC/FNDN"),"CORP")

If in column "A", there is a sentence with "INC" in
it, then in column "B", the word "CORP" should appear.

If in column "A", there is a sentence with "SOCIETY"
in it, then in "B", the word "ASSC/FNDN" should appear.

If in column "A", there is a sentence with "FOUNDATION" in
it, then in column "B", the word "ASSC/FNDN" should appear.

If in column "A", there is a sentence with "UNIVERSITY" in
it, then in column "B", the word "ACAD" should appear.
 
Just modify what I sent earlier to lookat part

Cells(Columns(1).Find("inc", lookat:=xlPart).Row, "b") = "corp"
copy and change to suit your other searches

add this line as just before you start your searches
on error resume next
 
I do not want to run a macro, just an "if, then"
statement. I don't think my code below is far off. thanks.

-----Original Message-----
Just modify what I sent earlier to lookat part

Cells(Columns(1).Find("inc", lookat:=xlPart).Row, "b")
= "corp"
copy and change to suit your other searches

add this line as just before you start your searches
on error resume next

Don Guillett
SalesAid Software
(e-mail address removed)

Just need some help finishing this code...thank you! DaveB

=IF(ISERR(FIND("INC",$A1)),IF(AND(ISERR(FIND
("SOCIETY",$A1)),ISERR(FIND("FOUNDATION",$A1))),IF(ISERR
FIND("UNIVERSITY",$A1)),"","ACAD"),"ASSC/FNDN"),"CORP")

If in column "A", there is a sentence with "INC" in
it, then in column "B", the word "CORP" should appear.

If in column "A", there is a sentence with "SOCIETY"
in it, then in "B", the word "ASSC/FNDN" should appear.

If in column "A", there is a sentence with "FOUNDATION" in
it, then in column "B", the word "ASSC/FNDN" should appear.

If in column "A", there is a sentence with "UNIVERSITY" in
it, then in column "B", the word "ACAD" should appear.
 
Then just keep building on this. CASE SENSETIVE or use search instead of
find.

=IF(NOT(ISERR(FIND("INC",C5))),"Corp",IF(NOT(ISERR(FIND("SOCIETY",C5))),"ASS
C","next one"))
 
Dave

you have posted this same query several times, and most of
them you have got a usable answer... is there some part of
the formulae that you would like explainde or expanded??

This is a usable formula for those four conditions:

=IF(ISERROR(SEARCH("inc",$A1)),IF(ISERROR(SEARCH
("unive",$A1)),IF(ISERROR(SEARCH("socie",$A1)),IF(ISERROR
(SEARCH
("founda",$A1)),"","ASSC/FNDT"),"ASSC/FNDT"),"ACAD"),"CORP"
)

Please let the ng know if you are still struggling with
this...

Cheers
Juan
 

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