+ Reply to Thread
Results 1 to 7 of 7

sum of values but count duplicated value with certain criteria once

  1. #1
    Registered User
    Join Date
    08-23-2018
    Location
    UAE
    MS-Off Ver
    2019 business
    Posts
    98

    sum of values but count duplicated value with certain criteria once

    hello there
    i am working with a certain kpi where each person enter his work
    sometimes same report number can be worked within group of people e.g 6
    so each tested 30 samples with total of 180
    so what i need is excel count duplicated report number once
    dont count number of samples if it has same report.xlsx

  2. #2
    Forum Expert PaulM100's Avatar
    Join Date
    10-09-2017
    Location
    UK
    MS-Off Ver
    Office 365
    Posts
    2,108

    Re: sum of values but count duplicated value with certain criteria once

    Try: =SUMPRODUCT((COUNTIF($B$2:$B$16,$B$2:$B$16)=1)*$D$2:$D$16)
    Click the * to say thanks.

  3. #3
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,053

    Re: sum of values but count duplicated value with certain criteria once

    Use:

    =SUMPRODUCT(1/COUNTIF($B$2:$B$16,$B$2:$B$16&""),$D$2:$D$16)
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  4. #4
    Registered User
    Join Date
    08-23-2018
    Location
    UAE
    MS-Off Ver
    2019 business
    Posts
    98

    Re: sum of values but count duplicated value with certain criteria once

    thanks it solved my problem
    this was my formula since i am dealing with large number of columns
    =SUMPRODUCT(1/COUNTIF(B:B,B:B&""),D:D)

    but if somenbody can help me to explain me more about the formula and how it work
    i want to study it

    thanks

  5. #5
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,053

    Re: sum of values but count duplicated value with certain criteria once

    SUMPRODUCT(1/COUNTIF($B$2:$B$16,$B$2:$B$16&""),$D$2:$D$16)

    Red included to ignore any blank cells in the range.
    Orange: returns the reciprocal of the total number of occurrences of each value. so, if an Order No appears 4 times it returns 0.25 four times.
    Cyan those reciprocals are multiplied by the values in D (unique values count as 1 multiple values as 1/n)
    Black add 'em all up.

    Unless you DO have 1,000,000 rows it is NOT a good idea to use whole column references in SUMPRODUCT. You will experience performance issues.

  6. #6
    Registered User
    Join Date
    08-23-2018
    Location
    UAE
    MS-Off Ver
    2019 business
    Posts
    98

    Re: sum of values but count duplicated value with certain criteria once

    thanks
    will study it now and i hope i understand it

  7. #7
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,053

    Re: sum of values but count duplicated value with certain criteria once

    Formulas/evaluate formula is a really handy tool to follow what Excel is doing. The only problem is that it isn't resizeable, which can be a bit of a pain...

+ 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. Replies: 2
    Last Post: 07-30-2018, 02:21 PM
  2. Replies: 4
    Last Post: 11-01-2016, 03:28 PM
  3. countinfs with 2 criteria, need to add non duplicated count
    By Mark_Delaware in forum Excel General
    Replies: 6
    Last Post: 12-21-2014, 04:22 PM
  4. Replies: 11
    Last Post: 07-04-2014, 07:10 AM
  5. Replies: 2
    Last Post: 01-21-2014, 02:53 PM
  6. [SOLVED] Count values in one list and then narrow/combine values based on criteria
    By razz0807 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 12-13-2013, 08:02 AM
  7. [SOLVED] Extract duplicated values based on an extra criteria
    By Eduard in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-21-2013, 05:50 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