+ Reply to Thread
Results 1 to 3 of 3

Number of repetitions in a collumn and counting those repetitions

  1. #1
    Registered User
    Join Date
    01-20-2013
    Location
    England
    MS-Off Ver
    Excel 2013
    Posts
    18

    Number of repetitions in a collumn and counting those repetitions

    Hi guys,

    I am not sure how to explain my problem properly not being from an english speaking background.
    I will try to make it simple.

    I have a collumn A1 with 12k rows, each has an id_number. Each id_number can appear once or multiple times in A1. Some will appear up to 70 times...
    I would like to know which id_numbers occur more than one time, and for each id_numbers that appear more than once, I would like to know how many times exactly they appear in A1.
    So far what I am doing is ordering A1 from A to Z, scrolling down and look at id_numbers that appear in many rows....

    If you did not understand what I am trying to achieve, please let me know

    Thank you

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Number of repetitions in a collumn and counting those repetitions

    Hi,

    The best option would be a pivot table. Make sure there's a column label immediately above the first item in column A, click anywhere in column A and choose Insert Pivot Table.
    Then drag the column Label into the Row Labels Area and also the Values area
    In the values area select the column label drop down and select the COUNT option rather than the default SUM.
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

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

    Re: Number of repetitions in a collumn and counting those repetitions

    Try this...

    Data Range
    A
    B
    C
    D
    1
    ID
    ID
    Count
    2
    1
    1
    2
    3
    1
    3
    2
    4
    2
    4
    2
    5
    3
    7
    2
    6
    3
    8
    3
    7
    4
    8
    4
    9
    5
    10
    6
    11
    7
    12
    7
    13
    8
    14
    8
    15
    8
    16
    ------
    ------
    ------
    ------


    This array formula** entered in C2:

    =IFERROR(INDEX(A:A,SMALL(IF(FREQUENCY(MATCH(A$2:A$15,A$2:A$15,0),ROW(A$2:A$15)-ROW(A$2)+1)>1,ROW(A$2:A$15)),ROWS(C$2:C2))),"")

    ** 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.

    This formula entered in D2:

    =IF(C2="","",COUNTIF(A:A,C2))

    Select C2:D2 and copy down until you get blanks.
    Last edited by Tony Valko; 01-15-2017 at 11:54 AM.
    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. Combination without repetitions from 5 sets of number
    By alboholic in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 09-19-2016, 12:11 PM
  2. [SOLVED] count number of repetitions
    By Ocean Zhang in forum Excel General
    Replies: 3
    Last Post: 03-17-2014, 07:32 PM
  3. Easy way to do it - Formula to count number of repetitions in a table
    By virtualdark in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 10-17-2013, 07:54 AM
  4. [SOLVED] Formula to count number of repetitions in a table
    By virtualdark in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 10-16-2013, 12:24 PM
  5. Counting number of repetitions of a number in a column?
    By festacc77 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 05-08-2013, 11:13 AM
  6. Counting number of repetitions of a number in a column?
    By webazoid in forum Excel General
    Replies: 5
    Last Post: 12-21-2011, 01:33 PM
  7. number repetitions highlighted
    By librababy in forum Excel Programming / VBA / Macros
    Replies: 23
    Last Post: 11-27-2010, 10:28 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