I've understood that Raw Materials start with a '1', Finished Products with a 'F' and cartons with a 'W', is this correct?
If you have some logic like this, you could use something like
pick( match(left(ProductName,1),'1','F','Z'),'Raw Materials','Finished Products','cartons') as ProductGroup,
pick() is a conditional function and match() will return the index of the matching substring as input.
You could also use a mapping table and applymap in a similar way, but I think for few groups above is ok.