ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   €śUse of more then 7 nested if statement€ť (https://www.excelbanter.com/excel-worksheet-functions/9103-%E2%80%9Cuse-more-then-7-nested-if-statement%E2%80%9D.html)

Faisal Yameen

€śUse of more then 7 nested if statement€ť
 
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,I F(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


Jason Morin

Try VLOOKUP:

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

HTH
Jason
Atlanta, GA

-----Original Message-----
I used if statement in the form of
=3DIF(A34=3DA2,C34,IF(A35=3DA2,C35,IF(A36=3DA2,C3 6,IF

(A37=3DA2,C37,IF(A38=3DA2,C38,IF(A39=3DA2,C39,IF(A 40=3DA2,C40,IF
(A2=3D"","","Un Known"))))))))=20
(It means if cell A2 is equal to A34 then print C34 and=20

if cell A2 is equal=20
to A35 then print C35 and respectively others and if=20

cell A2 is equal to =E2?o =E2?=9D=20
then cell C2 is equal to =E2?o =E2?=9D and if these all things=20

are false then print =E2?oUn=20
Known=E2?=9D )
(I used this formula in cell C2)
Here I used only 7 nested if statement. But now I want=20

to use more then it=20
nearly 500 nested if statement.
Please help me and guide me about this problem
Thanks

.


Aladin Akyurek

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

Faisal Yameen wrote:
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,I F(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


[email protected]

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



All times are GMT +1. The time now is 12:33 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com