+ Reply to Thread
Results 1 to 15 of 15

Adding If Functions Gives 0

  1. #1
    Forum Contributor
    Join Date
    07-15-2013
    Location
    New York, NY
    MS-Off Ver
    Excel 2010
    Posts
    129

    Adding If Functions Gives 0

    Hello,

    I'm adding two if functions together (as in the result of the first if function PLUS the result of the second) and for some reason, instead of giving FALSE when the logical test fails, excel is populating the cells with a 0.

    Here's my formula: =IF(SUM($B4:$L4)>=45,SUM(SUMIF($B4:$L4,LARGE($B4:$L4,{1,2,3}),$Z4:$AJ4)),FALSE)+IF(SUM($B4:$L4)>=45,SUM(SUMIF($B4:$L4,SMALL($B4:$L4,{1,2,3}),$Z4:$AJ4)),FALSE)

    Since FALSE is in the equation, it doesn't make sense to my that excel is reading it as a 0. I've tried separating out the two false statements, and on their own they read as false, but when I add the two separated equation together, it gives a 0.


    The worksheet is attached. I'm stumped--please help!
    Attached Files Attached Files

  2. #2
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: Adding If Functions Gives 0

    for math purposes excel treats false as 0 and true as 1

    perhaps

    =IF(SUM($B4:$L4)>=45,SUM(SUMIF($B4:$L4,LARGE($B4:$L4,{1,2,3}),$Z4:$AJ4))+SUM(SUMIF($B4:$L4,SMALL($B4:$L4,{1,2,3}),$Z4:$AJ4)),FALSE)
    Josie

    if at first you don't succeed try doing it the way your wife told you to

  3. #3
    Forum Contributor
    Join Date
    07-15-2013
    Location
    New York, NY
    MS-Off Ver
    Excel 2010
    Posts
    129

    Re: Adding If Functions Gives 0

    Fantastic, thank you!

  4. #4
    Forum Contributor
    Join Date
    07-15-2013
    Location
    New York, NY
    MS-Off Ver
    Excel 2010
    Posts
    129

    Re: Adding If Functions Gives 0

    Maybe you can help me with my next problem too. If the result is FALSE, I'd like to populate the cell with the closest previous value. Like I'd like to populate AL6 with AL5. I've tried an if(iserror(vlookup but it's not working for me.

  5. #5
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: Adding If Functions Gives 0

    replace the FALSE with the cell reference you want

  6. #6
    Forum Contributor
    Join Date
    07-15-2013
    Location
    New York, NY
    MS-Off Ver
    Excel 2010
    Posts
    129

    Re: Adding If Functions Gives 0

    The cell reference will depend on the cell. It wont always be the cell above if there are two or three false statements in a row. Maybe a vba code with if "false" would work...

  7. #7
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: Adding If Functions Gives 0

    then we need a sample workbook to see what you mean

    if you had three FALSE in a row they would all carry the same value from the previous cell using this method

  8. #8
    Forum Contributor
    Join Date
    07-15-2013
    Location
    New York, NY
    MS-Off Ver
    Excel 2010
    Posts
    129

    Re: Adding If Functions Gives 0

    The workbook is attached to the first post

  9. #9
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: Adding If Functions Gives 0

    yes but it doesn't appear to relate to your new issue-what should appear in the results?

  10. #10
    Forum Contributor
    Join Date
    07-15-2013
    Location
    New York, NY
    MS-Off Ver
    Excel 2010
    Posts
    129

    Re: Adding If Functions Gives 0

    Oh, I'm sorry. Here you go
    Attached Files Attached Files

  11. #11
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: Adding If Functions Gives 0

    what should appear in place of each of the FALSE values? say in AL17 specifically? (did you try my previous suggestion?)

  12. #12
    Forum Contributor
    Join Date
    07-15-2013
    Location
    New York, NY
    MS-Off Ver
    Excel 2010
    Posts
    129

    Re: Adding If Functions Gives 0

    The closest previous value in that column. So in the case of AL17, excel should pull down -.006, or AL15

  13. #13
    Forum Contributor
    Join Date
    07-15-2013
    Location
    New York, NY
    MS-Off Ver
    Excel 2010
    Posts
    129

    Re: Adding If Functions Gives 0

    Sorry, you're formula did work. Thank you

  14. #14
    Forum Contributor
    Join Date
    07-15-2013
    Location
    New York, NY
    MS-Off Ver
    Excel 2010
    Posts
    129

    Re: Adding If Functions Gives 0

    You've been so helpful. Really appreciated!!

  15. #15
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: Adding If Functions Gives 0

    you're welcome :-)
    Last edited by JosephP; 07-16-2013 at 12:29 PM.

+ 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. Need help adding functions to Budget sheet
    By ahmed4life in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 05-16-2013, 08:00 AM
  2. IF functions when adding and subtracting time
    By allan223 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 09-11-2012, 11:09 PM
  3. Adding VLOOKUP Functions From Different Spreadsheets
    By Sponge14 in forum Excel General
    Replies: 2
    Last Post: 03-20-2012, 07:52 PM
  4. adding functions
    By excelp in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 07-10-2008, 06:33 PM
  5. adding functions to drop-down items
    By oberon.black in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 12-20-2005, 12:41 AM

Tags for this Thread

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