I have a sequence of numbers of which some of them repeat , so I used the countif function to list how many times each number repeats if exists in the sequence. Now I want to group them(in a table) so the numbers that never occur in the sequence will be listed under 0, numbers that come up once under 1 and so on. i.e numbers : 1,2,3,4,5,6,7,8,9 ; sequence 2,3,5,3,3,7,8,6,7,5,7,5,8. So we have 1 and 9 should be listed under 0; 2,6 under 1; 8 under 2 and 3,5,7 under 3.