+ Reply to Thread
Results 1 to 5 of 5

If statement nesting

  1. #1
    Registered User
    Join Date
    04-26-2007
    Posts
    37

    If statement nesting

    I am working on a spreadsheet that calculates payments based on various scenarios. I am trying to modify a formula from another spreadsheet that had more conditions. When I removed the extra conditions to simplify the formula for this spreadsheet, I keep getting a false and I can't figure out where my statement is wrong.

    The formula consists of a series of nested if statements.

    Please see attached. The formula I am concerned with is in cell D2 (highlighted in orange).

    TIA!
    Attached Files Attached Files

  2. #2
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    re: If statement nesting

    Hard to determine exactly what you are looking for. I simplified your equation a bit by replacing all the nested IF statements regarding cell F2 with a CHOOSE Function. In any case, you don't have a statement for if B11/C#-B2>5000 is False. I showed where this would be in the formula with a "?". Also, are you sure you dont' want that to be B11/Sheet2!C#-B2 < 5000, "<5000" ?

    =IF(B2=0,"",IF(CHOOSE(MATCH(F2,{24,36,48,60},0),B11/Sheet2!C6,B11/Sheet2!C7,B11/Sheet2!C8,B11/Sheet2!C9)-B2>5000,"<$5000","?"))

    Hope that helped.
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  3. #3
    Registered User
    Join Date
    04-26-2007
    Posts
    37

    re: If statement nesting

    I am not familiar with the choose function but it does look a lot easier. However, I am trying to have the formula calculate if the result is greater than 5000, based on the term (24,36, etc), if not show <$5000 rather than the "?". Does that explain it better?

  4. #4
    Valued Forum Contributor
    Join Date
    02-08-2010
    Location
    Dallas, TX
    MS-Off Ver
    Excel 2007
    Posts
    122

    re: If statement nesting

    Maybe this,

    =IF(B2,IF(B11/VLOOKUP(F2,Sheet2!$A$6:$D$9,3,TRUE)-B2>5000,B11/VLOOKUP(F2,Sheet2!$A$6:$D$9,3,TRUE)-B2,"<$5000"),"")

    Regards

  5. #5
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    re: If statement nesting

    Your post does not comply with Rule 1 of our Forum RULES. Your post title should accurately and concisely describe your problem, not your anticipated solution. Use terms appropriate to a Google search. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will be addressed according to the OP's experience in the forum: If you have less than 10 posts, expect (and respond to) a request to change your thread title. If you have 10 or more posts, expect your post to be locked, so you can start a new thread with an appropriate title.
    To change a Title on your post, click EDIT then Go Advanced and change your title, if 2 days have passed ask a moderator to do it for you.

    Edited this time
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

+ 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