+ Reply to Thread
Results 1 to 10 of 10

Formula saying false, not number

  1. #1
    Forum Contributor
    Join Date
    07-18-2013
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    123

    Formula saying false, not number

    Formula

    =IF($C$2="No Snowball (Minimum Monthly Payment)", SUM(R$17-(R$17*'Debt Consolidated'!$I28-R$22),0, IF($C$2="No Snowball (Personal Monthly Payment)", SUM(R17-R22),0)))

    Keeps returning false for the second portion. The first one is fine. Any suggestions?

  2. #2
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,620

    Re: Formula saying false, not number

    Please Login or Register  to view this content.
    Ben Van Johnson

  3. #3
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,944

    Re: Formula saying false, not number

    Give this a try....
    syntax for an IF statement is...=IF(this-is-true, do this, else do that)
    in your 1st IF() you have 3 arguments (identified with BOLD, RED and UNDERLINE)...
    =IF($C$2="No Snowball (Minimum Monthly Payment)", SUM(R$17-(R$17*'Debt Consolidated'!$I28-R$22),0, IF($C$2="No Snowball (Personal Monthly Payment)", SUM(R17-R22),0)))

    so you are saying IF(C2="NO etc",then...R17=(R17* etc),else...0,else...your next IF() statement

    =IF($C$2="No Snowball (Minimum Monthly Payment)", R$17-(R$17*'Debt Consolidated'!$I28-R$22), IF($C$2="No Snowball (Personal Monthly Payment)", R17-R22,0),0)

    You dont need to use SUM() when you are just adding 2 numbers
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  4. #4
    Forum Contributor
    Join Date
    07-18-2013
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    123

    Re: Formula saying false, not number

    I just got it figured out but a different way, I seem to have many problems adding IFS

  5. #5
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,944

    Re: Formula saying false, not number

    Look at it this way...
    if you have a choice of 2 answers, use 1 if
    if you have a choice of 3 answers, use 2 nested if's
    if you have a choice of 4 answers, use 3 nested if's
    if you have a choice of 5 answers, consider using vlookup()

  6. #6
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,453

    Re: Formula saying false, not number

    Also note that in the expression SUM(R17-R22), the SUM function is redundant

  7. #7
    Forum Contributor
    Join Date
    07-18-2013
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    123

    Re: Formula saying false, not number

    Ok got it. Im going to try to learn some VLookups, hopefully thats easier. My formula

    =IF($C$2="No Snowball (Minimum Monthly Payment)",SUM(R$17-(R$17*'Debt Consolidated'!$I28-R$24),0,IF($C$2="No Snowball (Set Monthly Payment)",SUM(R17-R23),0)),SUM(R17-R23,0,IF($C$2="Snowball (Minimum Monthly Payment)",SUM(R$17-(R$22+$AO27),0,IF($C$2="Snowball (Set Monthly Payment)",SUM(R17-R23),0)),SUM(R17-R23,0))))

    keeps returning a false number, twice what its supposed to be, and my plan is to add 4 more IFs to this. Just trying to figure it one at a time and it is such a pain!

  8. #8
    Forum Contributor
    Join Date
    07-18-2013
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    123

    Re: Formula saying false, not number

    Pepe, if I put a formula together, a long one, would you be able to look at it for me and tell me what is wrong? This will help alot if I just did that, be warned, it's going to be long and not sure if you want to try.

  9. #9
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,944

    Re: Formula saying false, not number

    Before you make a really long formula, consider using helper columns, they can often significantly shorten and simplify formulas

    @ Pepe - redundant SUM() was mentioned in post # # as well

  10. #10
    Registered User
    Join Date
    07-19-2013
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    92

    Re: Formula saying false, not number

    Quote Originally Posted by FDibbins View Post
    Before you make a really long formula, consider using helper columns, they can often significantly shorten and simplify formulas
    They also allow you test parts of the formula - highly desirable, especially when trying something new.

+ 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. Replies: 2
    Last Post: 07-05-2010, 11:04 AM
  2. Err.Number executing Selection.QueryTable.Refresh BackgroundQuery:=False instruction
    By fguilbau in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-30-2009, 12:16 PM
  3. counting number of dates AND check for true false
    By Whisper1 in forum Excel General
    Replies: 1
    Last Post: 01-30-2007, 04:50 PM
  4. Replies: 2
    Last Post: 08-02-2006, 06:10 PM
  5. Convert TRUE/FALSE results to a number
    By pomalley in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 03-16-2005, 02:06 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