Hi Experts!

I am in great trouble help me out with this.

Here is my excel sheet view

Rank Name
1 A
1 B
1 C
2 A
2 B
2 C
3 A
3 B
3 C

Question

Now I want when I run a macro I should get only Top two values from each Rank.
Example output
1 A
1 B
2 A
2 B
3 A
3 B

Could you please give me a code for this?