You don't say where you're applying the PROPER function but I'm gessing on the sheet (because there is no PROPER function (I don't think) in
Power Query), but you can do this in
Power Query with the
Capitalize Each Word transformation. The only problem is that you end up with the same problem, but it's easier to get round in
Power Query:
- Replace hyphens with some sequence of letters you'll never meet in a name, eg:qzqzqz
- Capitalize Each Word
- Replace qzqzqz with a hyphen
The worksheet formula equivalent might be along the lines of:
=SUBSTITUTE(PROPER(SUBSTITUTE(TEXTJOIN(",",TRUE,E3 :G3),"-","qzqzqz")),"qzqzqz","-")