+ Reply to Thread
Results 1 to 7 of 7

Issue with Nested Formula

  1. #1
    Registered User
    Join Date
    02-12-2019
    Location
    USA
    MS-Off Ver
    2013
    Posts
    3

    Issue with Nested Formula

    Hello to all.

    I am running into an issue trying to write a nested formula. The formula consists of 3 parts. I can get it to work properly with 2, but when I attempt to add the last part it fails.


    Here is what I need...

    If A1 > 100 then A1*1.15 or else A1*1.18
    If A1 < 50 then A1*1.20

    OR...

    $0-$49 Add 20%
    $50-$99 Add 18%
    $100 & Up Add 15%



    This part works... =IF(A1>100,A1*1.15,A1*1.18)


    I thought this would work, but it doesn't... =IF(A1>100,A1*1.15,A1*1.18),IF(A1<50,A1*1.2) *I get a return of #VALUE

    I then tried... =IF(A1>100,A1*1.15,A1*1.18,IF(A1<50,A1*1.2)) *I get "Too Many Arguments".


    Can anyone help?

  2. #2
    Valued Forum Contributor
    Join Date
    10-15-2018
    Location
    MA, USA
    MS-Off Ver
    2010
    Posts
    907

    Re: Issue with Nested Formula

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

  3. #3
    Forum Expert Sambo kid's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    Office Professionsl Plus 2016- work; 2012 for Mac at home
    Posts
    5,232

    Re: Issue with Nested Formula

    I thought this would work, but it doesn't... =IF(A1>100,A1*1.15,A1*1.18),IF(A1<50,A1*1.2) *I get a return of #VALUE

    I then tried... =IF(A1>100,A1*1.15,A1*1.18,IF(A1<50,A1*1.2)) *I get "Too Many Arguments
    The reasons your second and third attempts failed are that after your first argument =IF(A1>100,A1*1.15,A1*1.18),IF(
    the bold red section is the end of the statement.
    in other words, when you have a complete if then statement it goes like this, IF condition A exists, do condition B, otherwise do condition C. If you tie in another if then after the first COMPLETE one excel doesn't know what to do with that so you have too many arguments.
    That is a complete statement, if you want to nest them you would have IF condition A exists, do condition B, then next IF condition C, do condition D...
    eventually you tell the statement what to do when none of the conditions exist.
    Hope that helps when you write your next if then statement.
    Make contributors happy, click on the "* Add Reputation" as a way to say thank you.
    Sam C

  4. #4
    Registered User
    Join Date
    02-12-2019
    Location
    USA
    MS-Off Ver
    2013
    Posts
    3

    Re: Issue with Nested Formula

    GeoffW283, you Sir are a genius! I struggled with this for about 45 minutes. Thank you for your time.

  5. #5
    Registered User
    Join Date
    02-12-2019
    Location
    USA
    MS-Off Ver
    2013
    Posts
    3

    Re: Issue with Nested Formula

    Thanks Sambo Kid! I had to read your reply a few times for it to stick, but I think I got it.

  6. #6
    Forum Expert Sambo kid's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    Office Professionsl Plus 2016- work; 2012 for Mac at home
    Posts
    5,232

    Re: Issue with Nested Formula

    you're welcome, AND thank you for the rep!

  7. #7
    Valued Forum Contributor
    Join Date
    10-15-2018
    Location
    MA, USA
    MS-Off Ver
    2010
    Posts
    907

    Re: Issue with Nested Formula

    There are some geniuses her but I'm not one of them! Thanks anyway for the rep

+ 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