+ Reply to Thread
Results 1 to 5 of 5

Using IF & AND

  1. #1
    Registered User
    Join Date
    08-13-2014
    Location
    Longview, WA
    MS-Off Ver
    2010
    Posts
    12

    Using IF & AND

    Hello all,

    I am trying to set up a sheet where I can add values from columns if they are positive and ignore them if they are negative. This is what I wrote:

    =IF(and(J2>0,F2>0,B3>0),J2+F2+B3,if(and(J2>0,F2>0,B3<0),J2+F2,if(and(J2>0,F2<0,B3>0),J2+B3,if(and(j2>0,F2<0,B3<0),J2,if(and(J2<0,F2>0,B3>0),F2+B3,if(and(J2<0,F2<0,B3>0),B3,if(and(J2<0,F2>0,B3<0),F2))))))0)

    It's quite messy and it doesn't actually work. Is there a way to fix it? or maybe a cleaner way of doing this?

    Thanks!!!

  2. #2
    Registered User
    Join Date
    08-13-2014
    Location
    Longview, WA
    MS-Off Ver
    2010
    Posts
    12

    Re: Using IF & AND

    FYI the equation just contains all outcomes of the individual results of flipping three coins essentially.

  3. #3
    Forum Expert Crooza's Avatar
    Join Date
    10-19-2013
    Location
    Hunter Valley, Australia
    MS-Off Ver
    Excel 2003 /7/10
    Posts
    2,082

    Re: Using IF & AND

    It appears that you simply want the sum of any positive values in those three cells.

    This will work

    Please Login or Register  to view this content.
    If they were in a continuous range you could try this (providing there were no other values in cells in that range

    Please Login or Register  to view this content.
    Last edited by Crooza; 11-06-2014 at 08:15 PM.
    Happy with my advice? Click on the * reputation button below

  4. #4
    Registered User
    Join Date
    08-13-2014
    Location
    Longview, WA
    MS-Off Ver
    2010
    Posts
    12

    Re: Using IF & AND

    YES! Exactly that. Thank you for your help!

  5. #5
    Forum Expert Crooza's Avatar
    Join Date
    10-19-2013
    Location
    Hunter Valley, Australia
    MS-Off Ver
    Excel 2003 /7/10
    Posts
    2,082

    Re: Using IF & AND

    Great . Glad it worked

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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