I have an excel sheet which contains 4 years data of schools. The data set contains school scores. Old schools have data for 3 or 4 years of data while new schools have only 1 or 2 years of data.
I have a column in my data set which represents the unique school ID's. Based on these school ID's I want to generate a column "Occurrence" which represents the number of times each unique id occurred in the data set. I am attaching a picture which shows clearly what I want to have in the occurrence column by using formula.
In G2
use:
=IF(COUNTIF(B$2:B2,B2)=1,COUNTIF(B:B,B2),"")
Drag down.