Many IF function in a cell?

  • Thread starter Thread starter Rae
  • Start date Start date
R

Rae

Hi,
Is it possible to have many IF function in a cell?...sayfor cell C2, I
C1=A then return 20, C1=B return 30 C1=C return 40 and so on.
Thanks!
 
Hi Rae!

There are ways of exceeding the nesting limit but it is better in the
case that you describe to use VLOOKUP.
 
Hi,
Is it possible to have many IF function in a cell?...sayfor cell C2, IF
C1=A then return 20, C1=B return 30 C1=C return 40 and so on.
Thanks!!

If you are talking about nesting IF's, you can nest up to seven functions. For
example: IF(C1="A",20,IF(C1="B",30,IF(C1="C",40,"NOT IN RANGE"))) has two
nested IF's.

But frequently there is a better way of doing things that is more extensible.

For example:

=VLOOKUP(C1,{"A",20;"B",30;"C",40},2)

can be extended in a variety of ways. In addition, the array can be placed in
a table and cell references used:

=VLOOKUP(C1,E1:F3,2)

with:

Col E F
1 A 20
2 B 30
3 C 40



--ron
 
Hi,
I am sorry to say being a not so IT-savvy person, I don't reall
understand the function VLOOKUP.
Thanks n sorry for the trouble....

If you are talking about nesting IF's, you can nest up to seve
functions. For
example: IF(C1="A",20,IF(C1="B",30,IF(C1="C",40,"NOT IN RANGE"))) ha
two
nested IF's.

But frequently there is a better way of doing things that is mor
extensible.

For example:

=VLOOKUP(C1,{"A",20;"B",30;"C",40},2) --> what does the 2 represent?

can be extended in a variety of ways. In addition, the array can b
placed in
a table and cell references used:

=VLOOKUP(C1,E1:F3,2)

with:

Col E F ----->I don't really understan
this part
1 A 20
2 B 30
3 C 40

--> what does the 2 represent? =VLOOKUP(C1,E1:F3,2) ----->I don'
really understand this par
 
Hi...

The 2 in the formula tells Excel to pull the result from the 2nd colum
of your lookup table
 
Using VLookup is probably your best way. If the example you gave is
actually what you are looking for, would this work?

=10*CODE(A1)-630

where A1 would have "A", "B", etc...

HTH
Dana DeLouis
 
--> what does the 2 represent? =VLOOKUP(C1,E1:F3,2) ----->I don't
really understand this part

The "lookup table" is in cells E1:F3. In other words

E1: "A" F1: 10
E2: "B" F2: 20
E3: "C" F3: 30

In the VLOOKUP function, the data in C1 will always be matched with the value
in the first column (E) of the table. The 2 tells the function to return the
result that is in the 2nd column of the table.

You should review HELP for the VLOOKUP function.



--ron
 

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