Hi

Say, a workbook has 12 worksheets, and their tabs are color coded - 3
different colors for 3 groups of tab. The order of color on each tab is
random. The objective is to move the tabs so that the colors are grouped
together - no matter which one is first.

For example:
Random colored tabs:
red,green,blue,red,green,blue,red,green,blue,red,green,blue
Sorted colored tabs:
red,red,red,red,green,green,green,green,blue,blue,blue,blue

Note: Green or blue can be first ... it doesn't matter.

Please help with some sample code or pseudo code.

Thank you
Steve