+ Reply to Thread
Results 1 to 4 of 4

Count repeat occurance, with duplicate values

  1. #1
    Registered User
    Join Date
    07-03-2016
    Location
    Washington, USA
    MS-Off Ver
    2016
    Posts
    38

    Count repeat occurance, with duplicate values

    Please Login or Register  to view this content.
    Hi,

    Above is a small piece of a table I'm working with. The column "CNUM" is 'Customer Number'.. Column "BL" is 'Bill of Lading Number'.. I'm trying to count how many unique BL numbers belong to the corresponding CNUM. As you can see, the CNUM '4882' has ordered 12 line items as 6 different orders. The value i want it to spit out in 'REPEATS' column is 6.

    I've googled a bit and found similar questions, solutions found with COUNTIF / COUNTIFS and also SUMPRODUCT.. But i haven't gotten it yet after some playing. Any help?
    Last edited by Andrewjs; 10-01-2016 at 03:52 PM.

  2. #2
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,148

    Re: Count repeat occurance, with duplicate values

    Try

    =SUMPRODUCT(($A$3:$A$14=A3)*(1/COUNTIF($F$3:$F$14,$F$3:$F$14)))

  3. #3
    Registered User
    Join Date
    07-03-2016
    Location
    Washington, USA
    MS-Off Ver
    2016
    Posts
    38

    Re: Count repeat occurance, with duplicate values

    Oh Awesome! That worked like a charm. I translated it to

    =SUMPRODUCT(([CNUM]=A271)*(1/COUNTIF([BL],[BL])))

    The formula is even starting to make sense why it works. Thank you.

  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: Count repeat occurance, with duplicate values

    This array formula** is more efficient...

    =SUM(IF(FREQUENCY(IF(A3:A14=A3,F3:F14),F3:F14),1))

    ** array formulas need to be entered using the key
    combination of CTRL,SHIFT,ENTER (not just ENTER).
    Hold down both the CTRL key and the SHIFT key
    then hit ENTER.
    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] List the first duplicate occurance
    By LAVA2 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 07-07-2016, 08:58 AM
  2. [SOLVED] Count then Delete Duplicate Values and put count next to now unique value
    By flipjarg in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-12-2014, 04:22 PM
  3. Replies: 1
    Last Post: 03-03-2014, 11:06 AM
  4. [SOLVED] Count Duplicate Occurances then Sum once per Occurance
    By Pierce Quality in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 11-09-2013, 12:05 PM
  5. [SOLVED] Identifying Duplicate Values (2nd, 3rd, and 4th occurance)
    By Montoro22 in forum Excel General
    Replies: 2
    Last Post: 07-31-2013, 11:30 AM
  6. [SOLVED] Formula to count the occurance of values seperated by a comma
    By bouncingbudha in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 04-02-2013, 10:23 PM
  7. Repeat values based on number count (without macro)
    By ibexcel in forum Excel General
    Replies: 7
    Last Post: 12-17-2009, 06:35 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