+ Reply to Thread
Results 1 to 7 of 7

Multiple "IF" Statements

  1. #1
    Registered User
    Join Date
    05-08-2012
    Location
    Birmingham, AL
    MS-Off Ver
    Excel 2010
    Posts
    3

    Multiple "IF" Statements

    Can someone please tell me what is wrong with my arguments and why the cell will only generate the first result?

    =SUM(IF(E28>=0.6-0.7999,D28*0.04,IF(E28+0.8-0.9999,D28*0.06,IF(E28>=1,D28*0.1))))

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Multiple "IF" Statements

    Each IF() statement needs an open and close paren:

    =SUM(IF(E28>=0.6-0.7999,D28*0.04), IF(E28+0.8-0.9999,D28*0.06), IF(E28>=1,D28*0.1))


    I believe there is a problem with the blue formula.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Forum Contributor
    Join Date
    08-04-2011
    Location
    Tampa, FL
    MS-Off Ver
    Excel 2007
    Posts
    109

    Re: Multiple "IF" Statements

    You can't do ranges like that. Try something like this:
    =IF(E28<0.6,D28,IF(E28<0.8,D28*0.04,IF(E28<1,D28*0.06,D28*0.1)))
    I didn't know the calculation if E28 < 0.6 so I just made it equal D28. Also not sure what the SUM function was used for.
    Last edited by Dionysos; 05-08-2012 at 06:17 PM.

  4. #4
    Valued Forum Contributor
    Join Date
    05-07-2012
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    354

    Re: Multiple "IF" Statements

    =SUM(IF(E28>=0.6-0.7999,D28*0.04,IF(E28+0.8-0.9999,D28*0.06,IF(E28>=1,D28*0.1))))

    blue portion of the formula should be a condition (may be E28 >= 0.8-0.9999?)
    Regards,
    Vandan

  5. #5
    Registered User
    Join Date
    05-08-2012
    Location
    Birmingham, AL
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Multiple "IF" Statements

    There was a problem with the blue formula....Thanks. Here is the updated formula, the other one was incorrect as it added all of the statements together for the result. I am trying to get different return values based on one particular cell's value.

    This one gives me an error:
    =IF(E28>=0.6-0.7999,D28*0.04),IF(E28>=0.8-0.9999,D28*0.06),IF(E28>=1,D28*0.1))

    This one only provides the results for the first argument:
    =IF(E28>=0.6-0.7999,D28*0.04,IF(E28>=0.8-0.9999,D28*0.06,IF(E28>=1,D28*0.1)))

  6. #6
    Registered User
    Join Date
    05-08-2012
    Location
    Birmingham, AL
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Multiple "IF" Statements

    Thank you!!! Thank you!!! I pulled the ranges and modified your suggestions and it word perfectly. Thank you so very much!! Now I can start living my life again and get some sleep tonight!!

  7. #7
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Multiple "IF" Statements

    If that takes care of your need, please select Thread Tools from menu above and set this topic to SOLVED.

+ 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