+ Reply to Thread
Results 1 to 4 of 4

Nested Ifs and what's the best solution?

  1. #1
    Registered User
    Join Date
    01-13-2008
    Posts
    13

    Nested Ifs and what's the best solution?

    I have this formula
    =SE(E($A2=Plan1!Z1,Plan3!AA1<=5,AA2<=5),Plan3!AA2+1,(SE(E($A1=Plan1!Z1,AA2<=5),AA2,SE(E($A2=Plan1!Z1,AA1>=5,AA2>=5,AA1<7,AA2<7),AA2+1,(SE(E($A1=Plan1!Z1,AA1>=5,AA2>=5,AA1<7,AA2<7),AA2,SE(E(AA1=7,$A1=Plan1!Z1),0,SE(E(AA1=7,$A2=Plan1!Z1),1,SE(E(AA2=7,$A1=Plan1!Z1),0,(SE(E(AA2=7,$A2=Plan1!Z1),1,0)
    se=if
    e=and

    and I need to simplify it because there's 8 ifs and excel does not support it. What's the best way I can simplify?

  2. #2
    Forum Expert
    Join Date
    01-15-2007
    Location
    Brisbane, Australia
    MS-Off Ver
    2007
    Posts
    6,591
    Hi

    A couple of thoughts

    1) Break the statements into 2 parts and add the results. Something like
    =IF(A1=1,1,IF(A1 = 2,2,IF(A1=3,3,IF(A1=4,4,0))))+IF(A1 = 6,6,IF(A1 = 7,7,IF(A1 = 8,8,0)))

    2) Again, break it into 2 parts, with each part in a different cell. Compare the results of the 2 cells, and select which is required.

    3) Build your own function that will do the evaluations.


    rylo

  3. #3
    Registered User
    Join Date
    01-13-2008
    Posts
    13
    Quote Originally Posted by rylo
    Hi

    A couple of thoughts

    1) Break the statements into 2 parts and add the results. Something like
    =IF(A1=1,1,IF(A1 = 2,2,IF(A1=3,3,IF(A1=4,4,0))))+IF(A1 = 6,6,IF(A1 = 7,7,IF(A1 = 8,8,0)))

    2) Again, break it into 2 parts, with each part in a different cell. Compare the results of the 2 cells, and select which is required.

    3) Build your own function that will do the evaluations.


    rylo
    I will try 1 as I arrive home tomorrow.
    But two is unpratical for my needs and I don't have knowdlge to try to do the 3.

  4. #4
    Forum Expert oldchippy's Avatar
    Join Date
    02-14-2005
    Location
    Worcester, UK
    MS-Off Ver
    Excel 2007 (Home)
    Posts
    7,097
    It might be worth looking here as well?

    http://www.cpearson.com/excel/nested.htm
    oldchippy
    -------------


    Blessed are those who can give without remembering and take without forgetting

    If you are happy with the help you have received, please click the <--- STAR icon on the left - Thanks.

    Click here >>> Top Excel links for beginners to Experts

    Forum Rules >>>Please don't forget to read these

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1