Please post the sample data set or sample workbook. it will be very easy for the people to provide solution.
A CASE formula can be used here as there are only 19 names:
Case [RVP] WHEN 'X' Then 'Group A'
When 'Y' Then 'Group B'
When 'Z' Then 'Group B'
I hope this helps