+ Reply to Thread
Results 1 to 7 of 7

Check four conditions return TRUE or FALSE

  1. #1
    Forum Contributor
    Join Date
    11-02-2007
    Location
    Bryne, Norway
    MS-Off Ver
    Microsoft Office Excel 2010
    Posts
    230

    Check four conditions return TRUE or FALSE

    I have several rows with numbers that is either 0, a balance or a text like n/a. I need a formula that return true if all are 0 or contain n/a. If there is one balance shall it be false. Any suggestion? See example:

    Please Login or Register  to view this content.
    Last edited by mkvassh; 11-16-2009 at 07:26 AM.

  2. #2
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Check four conditions return TRUE or FALSE

    How about

    =SUM(A1:D1)=0

  3. #3
    Forum Contributor
    Join Date
    11-02-2007
    Location
    Bryne, Norway
    MS-Off Ver
    Microsoft Office Excel 2010
    Posts
    230

    Re: Check four conditions return TRUE or FALSE

    It works, but I can't use it on the example below since it totals to zero. I need a FALSE in the example since there are individual balances.

    1000 -1000 0 0 TRUE

  4. #4
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Check four conditions return TRUE or FALSE

    Numerous ways really... another then might be

    =MAX(ABS(MIN(A1:D1));MAX(A1:D1))=0

    another

    =SUM(COUNTIF(A6:D6;{">0"\"<0"})*{1,1})=0
    Last edited by DonkeyOte; 11-16-2009 at 07:00 AM. Reason: changed delimiters

  5. #5
    Forum Contributor
    Join Date
    11-02-2007
    Location
    Bryne, Norway
    MS-Off Ver
    Microsoft Office Excel 2010
    Posts
    230

    Re: Check four conditions return TRUE or FALSE

    It works but why do you use ABS on the MIN value. It will work without ABS?

  6. #6
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Check four conditions return TRUE or FALSE

    It will work without ABS?
    Not necessarily, no. Consider

    A1:D1
    -1000 0 n/a 0
    E1: =MAX(MIN(A1:D1);MAX(A1:D1))=0 --> returns TRUE as MAX is 0

    whereas

    E1: =MAX(ABS(MIN(A1:D1);MAX(A1:D1))=0 --> returns FALSE as MAX becomes 1000

    If you wish to avoid ABS you could switch to an AND based test, ie:

    E1: =AND(MIN(A1:D1)=0;MAX(A1:D1)=0)
    Last edited by DonkeyOte; 11-16-2009 at 07:19 AM. Reason: changed delimiter

  7. #7
    Forum Contributor
    Join Date
    11-02-2007
    Location
    Bryne, Norway
    MS-Off Ver
    Microsoft Office Excel 2010
    Posts
    230

    Re: Check four conditions return TRUE or FALSE

    Thank you :-)

+ 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