escobf,

So that we can get it right the first time:

Please post a workbook containing Sheet1's raw data in column R (say 10 groups), and, in Sheet2 column R (manually formatted by you) the results you are looking for.

To attach your workbook, scroll down and click on the Go Advanced button, then scroll down and click on the Manage Attachments button.