SUBSTITUTE can locate matching text anywhere in a cell, and replace it with the text of your choice.
The “old text” is entered as CHAR(10).
This will match a line break character in a cell.
The “new text” is entered as “, “.
This translates to a comma plus one space.
We need the quotes because this is a text value.