Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Faisal Yameen
 
Posts: n/a
Default Use of more then 7 nested if statement

I used if statement in the form of
=IF(B37=B2,C37,IF(B38=B2,C38,IF(B39=B2,C39,IF(B40= B2,C40,IF(B41=B2,C41,
IF(B42=B2,C42,IF(B43=B2,C43,IF(B44=B2,C44,"Un Known"))))))))
(It means if cell B2 is equal to B37 then print C37 and if cell B2 is equal
to B38 then print C38 and respectively others)
(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.

  #2   Report Post  
Bernie Deitrick
 
Posts: n/a
Default

Faisal,

In C2, use the formula:

=VLOOKUP(B2,B37:C2000,2,FALSE)

HTH,
Bernie
MS Excel MVP

"Faisal Yameen" wrote in message
...
I used if statement in the form of
=IF(B37=B2,C37,IF(B38=B2,C38,IF(B39=B2,C39,IF(B40= B2,C40,IF(B41=B2,C41,
IF(B42=B2,C42,IF(B43=B2,C43,IF(B44=B2,C44,"Un Known"))))))))
(It means if cell B2 is equal to B37 then print C37 and if cell B2 is

equal
to B38 then print C38 and respectively others)
(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.



  #3   Report Post  
Bernie Deitrick
 
Posts: n/a
Default

Faisal,

Sorry, forgot about the not found part:

=IF(ISERROR(VLOOKUP(B2,B37:C2000,2,FALSE)),
"UnKnown",VLOOKUP(B2,B37:C2000,2,FALSE))

All on one line....

HTH,
Bernie
MS Excel MVP

"Bernie Deitrick" <deitbe @ consumer dot org wrote in message
...
Faisal,

In C2, use the formula:

=VLOOKUP(B2,B37:C2000,2,FALSE)

HTH,
Bernie
MS Excel MVP

"Faisal Yameen" wrote in message
...
I used if statement in the form of
=IF(B37=B2,C37,IF(B38=B2,C38,IF(B39=B2,C39,IF(B40= B2,C40,IF(B41=B2,C41,
IF(B42=B2,C42,IF(B43=B2,C43,IF(B44=B2,C44,"Un Known"))))))))
(It means if cell B2 is equal to B37 then print C37 and if cell B2 is

equal
to B38 then print C38 and respectively others)
(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.





Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
why are nested subtotals coming out below outer subtotals? Hendy Excel Worksheet Functions 2 January 18th 05 08:09 PM
Employing constant arrays to limit nested IF statements. Richard-44 Excel Worksheet Functions 2 January 6th 05 02:19 AM
Q: Nested if JIM.H. Excel Discussion (Misc queries) 2 December 31st 04 09:17 PM
7+ nested if statement? Turi Excel Worksheet Functions 3 December 20th 04 07:55 PM
nested ifs sthompson Setting up and Configuration of Excel 1 December 15th 04 06:38 PM


All times are GMT +1. The time now is 05:08 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright 2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"