View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Mike H Mike H is offline
external usenet poster
 
Posts: 11,501
Default If statement help needed

I hope someone comes up with something better because this is messy but it
does solve the problem:-

In A1=IF(ISNUMBER(SEARCH("Cost
Center",E12)),"A",IF(ISNUMBER(SEARCH("OM",E12)),"B ",IF(ISNUMBER(SEARCH("Bank
Information",E12)),"C",IF(ISNUMBER(SEARCH("Departm ent",E12)),"D",IF(ISNUMBER(SEARCH("Promotion",E12) ),"E",IF(ISNUMBER(SEARCH("Reports",E12)),"F",""))) )))

In A2=IF(ISNUMBER(SEARCH("Sal",E12)),"G","")
In A3=IF(AND(A1="",A2=""),"Not OK",CONCATENATE(A1,A2))

Mike

"ah" wrote:

Hi;

I get an error when I use the following statement:

=IF(ISNUMBER(SEARCH("Cost
Center",E12)),"A",IF(ISNUMBER(SEARCH("OM",E12)),"B ",IF(ISNUMBER(SEARCH("Bank
Information",E12)),"C",IF(ISNUMBER(SEARCH("Departm ent",E12)),"D",IF(ISNUMBER(SEARCH("Promotion",E12) ),"E",IF(ISNUMBER(SEARCH("Reports
To",E12)),"F",IF(ISNUMBER(SEARCH("SAL",E12)),"G"," Not OK")))))))

The error message is as follows:
The formula you type contains an error

Can anyone help me with this?