+ Reply to Thread
Results 1 to 6 of 6

Sumifs not equal to more than one condition in the same range

  1. #1
    Valued Forum Contributor
    Join Date
    12-02-2009
    Location
    Austin, Tx
    MS-Off Ver
    Office 365 64-Bit, 2108, build 14326.21018
    Posts
    3,952

    Sumifs not equal to more than one condition in the same range

    Trying to figure out how to exclude two items in the same range. I want the sum of Column M if Column G doesn't contain 767103 or 767104 (text values). I tried like below, but that doesn't give me the correct values (gives me the value of the whole column). Any help would be appreciated.

    [CODE][/=SUMIFS($M$2:$M$1169,$G$2:$G$1169,"<>767104",$G$2:$G$1169,"<>767103")CODE]

  2. #2
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Sumifs not equal to more than one condition in the same range

    Quote Originally Posted by jomili View Post
    767103 or 767104 (text values).
    Maybe this...

    =SUMPRODUCT(--ISNA(MATCH($G$2:$G$1169,{"767104","767103"},0)),$M$2:$M$1169)
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  3. #3
    Valued Forum Contributor
    Join Date
    12-02-2009
    Location
    Austin, Tx
    MS-Off Ver
    Office 365 64-Bit, 2108, build 14326.21018
    Posts
    3,952

    Re: Sumifs not equal to more than one condition in the same range

    And *Bingo*! You win the prize!

    I follow it all except the "--" at the front. What's the purpose of that?

  4. #4
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Sumifs not equal to more than one condition in the same range

    Quote Originally Posted by jomili View Post
    I follow it all except the "--" at the front. What's the purpose of that?
    The SUMPRODUCT function works with numbers.

    The ISNA function returns the Boolean values TRUE or FALSE. We have to convert those to numbers so SUMPRODUCT can work.

    Using the double unary minus -- is one way to do that.

    --TRUE = 1
    --FALSE = 0

  5. #5
    Valued Forum Contributor
    Join Date
    12-02-2009
    Location
    Austin, Tx
    MS-Off Ver
    Office 365 64-Bit, 2108, build 14326.21018
    Posts
    3,952

    Re: Sumifs not equal to more than one condition in the same range

    Of course! It's been awhile since I've used ISNA (I used to use it as "IF(ISNA(" until IFERROR came along) so didn't think of the TRUE and FALSE. Thanks so much for showing me a better way.

  6. #6
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Sumifs not equal to more than one condition in the same range

    You're welcome. Thanks for the feedback!

+ 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. Sumifs that does not equal a range of values
    By whiZZfiZZ in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 06-09-2016, 01:03 PM
  2. Sumifs not equal to
    By Shoemate in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 08-14-2015, 01:50 PM
  3. Sumifs not equal to
    By Shoemate in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 08-13-2015, 11:13 AM
  4. [SOLVED] sumifs does not equal
    By rs1aj in forum Excel Formulas & Functions
    Replies: 20
    Last Post: 06-17-2015, 10:22 PM
  5. Perform macro on Condition - If it is equal to specific value in a cell range
    By Sivashanmugam in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-04-2015, 04:08 AM
  6. [SOLVED] Set Sumifs Criteria Range to equal year
    By HCLax in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 07-10-2014, 09:53 AM
  7. SumIfs containing a greater than or equal to And less than or equal to
    By teton88 in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 04-15-2014, 07:47 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