+ Reply to Thread
Results 1 to 9 of 9

3 Nested IF stament

  1. #1
    Registered User
    Join Date
    08-18-2014
    Location
    USA
    MS-Off Ver
    2007
    Posts
    4

    Question 3 Nested IF stament

    For the life of me I cannot get this to work. I get to many arguments

    =IF(AND(B151=0,B196=0),(B106+B151+B196),IF(AND(B151>0,B196=0),(B106+B151+B196)/2)IF(AND(B151>0,B196>0),(B106+B151+B196)/3))



    It only works with these 2

    =IF(AND(B151>0,B196=0),(B106+B151+B196)/2

    Any help would be appreciated.

    Thanks,
    Bob

  2. #2
    Valued Forum Contributor
    Join Date
    01-19-2012
    Location
    Barrington, IL
    MS-Off Ver
    Excel 2007/2010
    Posts
    1,211

    Re: 3 Nested IF stament

    At first glance, missing comma


    =IF(AND(B151=0,B196=0),(B106+B151+B196),IF(AND(B151>0,B196=0),(B106+B151+B196)/2),IF(AND(B151>0,B196>0),(B106+B151+B196)/3))
    You should hit F5, because chances are I've edited this post at least 5 times.
    Example of Array Formulas
    Quote Originally Posted by Jacc View Post
    Sorry, your description makes no sense. I just made some formula that looks interesting cause I had nothing else to do.
    Click the * below on any post that helped you.

  3. #3
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: 3 Nested IF stament

    Try this one.

    Please Login or Register  to view this content.
    I changed /added (both) red text.
    Notice my main language is not English.

    I appreciate it, if you reply on my solution.

    If you are satisfied with the solution, please mark the question solved.

    You can add reputation by clicking on the star * add reputation.

  4. #4
    Forum Expert boopathiraja's Avatar
    Join Date
    07-12-2013
    Location
    Coimbatore,TamilNadu, India
    MS-Off Ver
    Excel 2007, 2013, 2016, 365
    Posts
    1,455

    Re: 3 Nested IF stament

    You may try with this (Untested)

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Click just below left if it helps, Boo?ath?

  5. #5
    Valued Forum Contributor
    Join Date
    01-19-2012
    Location
    Barrington, IL
    MS-Off Ver
    Excel 2007/2010
    Posts
    1,211

    Re: 3 Nested IF stament

    At second glance, this is the extra argument

    =IF(AND(B151=0,B196=0),(B106+B151+B196),IF(AND(B151>0,B196=0),(B106+B151+B196)/2),IF(AND(B151>0,B196>0),(B106+B151+B196)/3,"value_if_false"))

    Blue = test
    Green = if test=true
    Red = if test=false
    Bold = ???

  6. #6
    Forum Expert boopathiraja's Avatar
    Join Date
    07-12-2013
    Location
    Coimbatore,TamilNadu, India
    MS-Off Ver
    Excel 2007, 2013, 2016, 365
    Posts
    1,455

    Re: 3 Nested IF stament

    You may try with this (Untested)

    Formula: copy to clipboard
    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    08-18-2014
    Location
    USA
    MS-Off Ver
    2007
    Posts
    4

    Re: 3 Nested IF stament

    Looks like Boopathiraha worked.. It likes like mine but I kept getting to many arguements for this function. Who knows. Its not a perfect forumla.

  8. #8
    Valued Forum Contributor
    Join Date
    01-19-2012
    Location
    Barrington, IL
    MS-Off Ver
    Excel 2007/2010
    Posts
    1,211

    Re: 3 Nested IF stament

    Boopathiraha's formula looks like it works, but I am not sure it will return your desired result. Basically what it is doing is adding ((B106+B151+B196)/2) + ((B106+B151+B196)/3) if B151 and B196 are both > 0 . See my previous post.

  9. #9
    Forum Expert cbatrody's Avatar
    Join Date
    04-15-2014
    Location
    Dubai
    MS-Off Ver
    Microsoft Office 365 ProPlus
    Posts
    2,136

    Re: 3 Nested IF stament

    =(if(and(b151=0,b196=0),(b106+b151+b196),if(and(b151>0,b196=0),(b106+b151+b196)/2,if(and(b151>0,b196>0),(b106+b151+b196)/3,0))))

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. How to reduces Nested IF code(144 Nested IF) to achive same functionality
    By jobseeker in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-09-2014, 09:45 AM
  2. MAKE CELL BLANK IF VALUE = 0 (any ideas on adding an if stament to VBA code)
    By eaykan in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-27-2013, 12:59 PM
  3. No change cell value if the IF stament is FALSE.
    By flakis05 in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 12-23-2012, 10:52 AM
  4. help on a nested countif/nested if formula
    By vickiemc in forum Excel General
    Replies: 2
    Last Post: 08-13-2008, 08:29 AM
  5. IF Stament formula nesting
    By batmanlasd in forum Excel General
    Replies: 2
    Last Post: 10-27-2005, 04:05 PM

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