+ Reply to Thread
Results 1 to 3 of 3

How to extract duplicate from the range of cells and gives its count?

  1. #1
    Registered User
    Join Date
    02-20-2012
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    8

    How to extract duplicate from the range of cells and gives its count?

    Hello everyone,

    I am a newbie to excel. I wanted to know how to extract duplicate from the range of cells and get its count? I was able to achieve this in pivot table, but I wanted to know if there is a simple and proper way of doing it (using functions if required)?

    Example:
    Input:

    Animals
    Tiger
    Tiger
    Tiger
    Tiger
    Cow
    Cow
    Cow
    Goat
    Goat
    Goat

    Expected output:

    Tiger=4
    Cow=3
    Goat=3

    Many thanks in Advance.

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,733

    Re: How to extract duplicate from the range of cells and gives its count?

    The attached workbook shows how you can do this with 2 formulae. With your data in A2:A11, this array* formula is in B2:

    =IFERROR(INDEX(A$2:A$11,MATCH(0,COUNTIF($B$1:B1,A$2:A$11),0)),"")

    * An array formula must be committed using the key combination of Ctrl-Shift-Enter instead of the usual <Enter>.

    This formula is in C2:

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

    and then both formulae are copied down further than is really necessary to display your results.

    Hope this helps.

    Pete
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    02-20-2012
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    8

    Re: How to extract duplicate from the range of cells and gives its count?

    This works. Thank you so much Pete.

+ 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