How may I replace the carriage return (new line) in a cell with a comma and a space (", ") using the command SUBSTITUTE or any other suitable command.
As an example I want to change left cell to look like the right cell. Thank you.
Either, do it like Stefan said with char(10) or do the carriage return directly like:
=SUBSTITUTE(A1," <- hit Alt+Enter to make a new line inside a cell
",", ")
You also could simply copy/paste the "new line" (which i would do)... cus sometimes a "new line" <> "new line"
To do it in a clean way, i suggest this:
=SUBSTITUTE(SUBSTITUTE(A1,CHAR(13)&CHAR(10),", "),CHAR(10),", ")
If you are not sure which kind of carriage return you are facing, it will be better to check for the "2-char-new-line" or you may stick with CHAR(13) which may cause trouble later :)