+ Reply to Thread
Results 1 to 4 of 4

SUMIF A or B only if unique

  1. #1
    Registered User
    Join Date
    12-21-2015
    Location
    Nashville, TN
    MS-Off Ver
    2010
    Posts
    1

    SUMIF A or B only if unique

    Anyone have a quick fix for SUMIFonlycountonce.xlsx

    Looking to count ordered units based on a number as Parent or Customer, but not to double the order if the number happens to be both Parent and Customer. Trying to get to 40 in one formula with this example so I don't have to use a helper for 200+ parents/customers.

  2. #2
    Forum Guru samba_ravi's Avatar
    Join Date
    07-26-2011
    Location
    Hyderabad, India
    MS-Off Ver
    Excel 2021
    Posts
    8,914

    Re: SUMIF A or B only if unique

    =sumproduct(((a2:a5=100)+(c2:c5=100)>0)*e2:e5)
    Samba

    Say thanks to those who have helped you by clicking Add Reputation star.

  3. #3
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2404
    Posts
    13,406

    Re: SUMIF A or B only if unique

    Not clear what you want to do about the 101s. I included them. I had to extend the range with this; the SUM formula in F6 will have to be moved down.
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    With the numbers arranged as in your upload the total = 40. With C4 and C5 swapped it still returns 40. Is this what you expect?
    Dave

  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: SUMIF A or B only if unique

    Here's another one...

    =SUMPRODUCT(SIGN((A2:A5=100)+(C2:C5=100)),E2:E5)
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

+ 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. [SOLVED] SUMIF array formula to count unique values after a certain date
    By CakeMish in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 07-13-2015, 09:24 AM
  2. unique across three conditions, then sumif
    By icestationzbra in forum Excel General
    Replies: 3
    Last Post: 05-28-2014, 05:57 PM
  3. [SOLVED] Excel VBA Code Instead of SumIf Array Formula for Unique Values
    By excelforumkeys in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 03-12-2014, 03:39 PM
  4. [SOLVED] Sum unique values according to criteria (sumif unique values)
    By hmpw in forum Excel General
    Replies: 8
    Last Post: 07-14-2012, 06:21 AM
  5. Sumif Unique
    By bushmills in forum Excel General
    Replies: 5
    Last Post: 03-23-2011, 04:16 PM
  6. SUMIf Unique Values
    By aftabn10 in forum Excel General
    Replies: 5
    Last Post: 04-16-2009, 04:09 AM
  7. [SOLVED] Sumif only unique items
    By Jay in forum Excel General
    Replies: 0
    Last Post: 08-09-2006, 11:49 AM

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