This is exactly what I was going to recommend. It isn't pretty or short but it will work.
Re: Adding students already enrolled in courses to groups based on profile field
by Melanie Scott -
Number of replies: 0