Assuming those are the only 5 options.. then try this in a cell within same same row as B2 (i.e. Row 2).:
=IF(COLUMNS($A$1:A$1)>SUMPRODUCT(--ISNUMBER(SEARCH({"PG","SF","SG","C ","PF"},$B2))),"",INDEX({"PG","SF","SG","C","PF"},SMALL(IF(ISNUMBER(SEARCH({"PG","SF","SG","C ","PF"},$B2)),{1,2,3,4,5}),COLUMN(A$1))))
Once entered confirm it with CTRL+SHIFT+ENTER not just ENTER.. You will see { } brackets appear around the formula.
Then copy it over 5 cells and down as far as you need.
Only the matches should appear in those groups of 5 cells.
Note: If you have more than 5 possibilities, it would be easier to replace those hard-coded values with a range containing the possibilities.
Bookmarks