The code is complicated, but doable, if you are going to use a group table and I have a name for it.
I can also use a query to obtain the Group names if you are not.
Will you do this manually in Excel and is it just a 1 one off?
Are you watching wimbledon or stuck at work?