+ Reply to Thread
Results 1 to 4 of 4

Array sum for negative match

  1. #1
    Gooseman
    Guest

    Array sum for negative match

    Hi,

    I have two columns eg:

    a 1
    b 2
    c 3
    d 4

    How do I sum all the values on the right column if the column on the
    left does not equal (for example) a and b - leading to 7?

    Ideally, the data of things not to include shoud be a range.

    Many thanks in advance.


  2. #2
    Sandy Mann
    Guest

    Re: Array sum for negative match

    One way:

    =SUM(B1:B4)-SUMIF(A1:A4,"a",B1:B4)-SUMIF(A1:A4,"b",B1:B4)

    --
    HTH

    Sandy
    [email protected]
    [email protected] with @tiscali.co.uk


    "Gooseman" <[email protected]> wrote in message
    news:[email protected]...
    > Hi,
    >
    > I have two columns eg:
    >
    > a 1
    > b 2
    > c 3
    > d 4
    >
    > How do I sum all the values on the right column if the column on the
    > left does not equal (for example) a and b - leading to 7?
    >
    > Ideally, the data of things not to include shoud be a range.
    >
    > Many thanks in advance.
    >




  3. #3
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675
    Try

    =SUMPRODUCT(1-ISNUMBER(MATCH(A1:A4,F1:F10,0)),B1:B4)

    where F1:F10 is a range containing the items not to include

  4. #4
    Bob Phillips
    Guest

    Re: Array sum for negative match

    =SUMPRODUCT(--(NOT(ISNUMBER(MATCH(A1:A4,K1:K2,0)))),B1:B4)

    --

    HTH

    Bob Phillips

    (remove nothere from the email address if mailing direct)

    "Gooseman" <[email protected]> wrote in message
    news:[email protected]...
    > Hi,
    >
    > I have two columns eg:
    >
    > a 1
    > b 2
    > c 3
    > d 4
    >
    > How do I sum all the values on the right column if the column on the
    > left does not equal (for example) a and b - leading to 7?
    >
    > Ideally, the data of things not to include shoud be a range.
    >
    > Many thanks in advance.
    >




+ 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