the sort and filter will do most of it. To do the calculation use a formula of the form =COUNTIF(A:A,A1) and copy it down.