Excel: Find the top five names and occurrence


Hi Friends, I have declared a range (A2:A25) in vba. Range contains names. PFB the table.

[TR] [TD="class: xl66, width: 64"]Names
[TABLE="width: 64"]
David
David
Adam
Mike
Adam
Adam
Adam
David
Harry
Robert
Robert
John
John
John
John
Adam
Mike
Mike
John
John
Robert
Robert
Tom
Tom
[/TD] [/TR] [/TABLE] Now i would like to display a message box with name top five occurrence with their occurrence. Like this John 6 Adam 5 Robert 4 David 3 Mike 3 Let me know your comments, any help is appreciated. Please make sure code is simpler and easily understandable as I am new to vba. Thanks viktiw


This question generated 21 answers. To proceed to the answers, click here.

This thread is current as of January 03, 2015.


For more resources for Microsoft Excel