View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Roger Govier Roger Govier is offline
external usenet poster
 
Posts: 2,886
Default If statement help needed

Hi

Unless you are using XL2007, there is a limit of 7 for nested functions.
If you create a list of your 7 items you are looking for in say cells
A1:A7, then you could use

=IF(SUMPRODUCT(--(ISNUMBER(FIND($A$1:$A$7,D1)))),"G","Not OK")

Note I have used Find as this is case sensitive as opposed to Search.
Clearly your list can be more than 7 items, just extend the range A1:A7
to cover the number of items concerned.
--
Regards

Roger Govier


"ah" wrote in message
...
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?