Will using the auto filter create what you are looking for?

http://www.wikihow.com/Use-AutoFilter-in-MS-Excel
ba
If this is what you are looking for and need it automated, this can be accomplished with VBA