“Use of more then 7 nested if statementâ€

F

Faisal Yameen

I used if statement in the form of
=IF(A34=A2,C34,IF(A35=A2,C35,IF(A36=A2,C36,IF(A37=A2,C37,IF(A38=A2,C38,IF(A39=A2,C39,IF(A40=A2,C40,IF(A2="","","Un Known"))))))))
(It means if cell A2 is equal to A34 then print C34 and if cell A2 is equal
to A35 then print C35 and respectively others and if cell A2 is equal to “ â€
then cell C2 is equal to “ †and if these all things are false then print “Un
Known†)
(I used this formula in cell C2)
Here I used only 7 nested if statement. But now I want to use more then it
nearly 500 nested if statement.
Please help me and guide me about this problem
Thanks
 
J

Jason Morin

Try VLOOKUP:

=VLOOKUP(A2,A34:C533,3,0)

HTH
Jason
Atlanta, GA
-----Original Message-----
I used if statement in the form of
=IF(A34=A2,C34,IF(A35=A2,C35,IF(A36=A2,C36,IF
(A37=A2,C37,IF(A38=A2,C38,IF(A39=A2,C39,IF(A40=A2,C40,IF
(A2="","","Un Known"))))))))
 
A

Aladin Akyurek

=IF(ISNUMBER(MATCH(A2,$A$34:$A$40,0)),INDEX($C$34:$C$40,MATCH(A2,$A$34:$A$40,0)),"")
 
H

hrlngrv

Aladin Akyurek wrote...
=IF(ISNUMBER(MATCH(A2,$A$34:$A$40,0)),INDEX($C$34:$C$40,MATCH(A2,$A$34:$A$40,0)),"")
....

Why INDEX(.,MATCH(.)) rather than VLOOKUP(A2,$A$34:$C$40,3,0)?
 

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

Top