View Single Post
  #9   Report Post  
Posted to microsoft.public.excel.worksheet.functions
ah ah is offline
external usenet poster
 
Posts: 33
Default If statement help needed

Hi;

Thanks for your help.
But, I'm confused now. Let me tell you what I want so that you can assist me:

I want the system to assign a value based on the following pre defined table:
If Cell A1 contains the word called "Cost Center", then assign the value 0.5
to me
If Cell A1 contains the word called "Department", then assign the value 1.0
to me
If Cell A1 contains the word called "Bank", then assign the value 1.2 to me
and etc

FYI, I have about 30 criterias to fulfill.
What are the best approach that I can use?
Please advice.
Thanks in advance

"Toppers" wrote:

There is a limit of 7, although to can have work around.

Look at VLOOKUP as an alternative solution: create table in column A & B
starting row 2

A B
Cost Center A
OM B

etc

=VLOOKUP(E12,$A$2:$A$10,2,0)

For error condition:

=IF(ISNA(VLOOKUP(E12,$A$2:$A$10,2,0)),"Not OK",VLOOKUP(E12,$A$2:$A$10,2,0))

HTH

"ah" wrote:

Hi;

Is there a limit of the if else criteria that I can put in for excel? I
found that it doesn't allow me to put in more than 7 criterias.


"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?