Home » excel » excel – Formula for number of occurrence of the sorted data

excel – Formula for number of occurrence of the sorted data

Posted by: admin May 14, 2020 Leave a comment

Questions:

So I have this column with frequently occurring data. I’ve sorted the unique values and I am looking to calculate the number of occurrence of each individual data.

enter image description here

How to&Answers:

One way of doing this is:

  • Select the range with all recurring data
  • Copy the data to a new page / location
  • Select the newly pasted data
  • Under the Data tab, click Remove Duplicates
  • Apply the below formula to your list
=COUNTIF(A:A,A1)

Alternatively, if you are filtering the data, you can simply use the same formula on your existing list since you would be filtering out the duplicates anyways.

Answer:

Create a pivot table. That’s what they do.

Answer:

First you can use combination of INDEX(), MATCH() function to extract unique values from your list. Then use Countif() function to count occurrence. To extract use below formula.

=IFERROR(INDEX($A$2:$A$10,MATCH(0,INDEX(COUNTIF($C$1:C1,$A$2:$A$10),0,0),0)),"")

To count occurrence use following formula.

=COUNTIF(A:A,C2)

enter image description here

Alternatively you can use Advance Filter method to extract unique values then use COUNT() function.

Answer:

Being that you already have the unique values, the answer to your question is to use the COUNTIF formula.

=COUNTIF(A:A,C2) then drag down

The assumptions (which are consistent with your screenshot) for the formula are:

Column A has your base data with the multiples in it

Column C has your unique values and they start on row 2

The formula is pasted into D2 and dragged down