below macro performs 'cleaning and trimming' on selected cells.
The trouble is that manually entered 'manual line breaks' (Alt+Enter) get also deleted. As a matter of fact, I would like to preserve these.
Help is much appreciated. Thank you very much in advance.
Application.EnableCancelKey = xlDisabled
'// CLEAN > Removes all nonprintable characters from text.
'// TRIM > Removes all spaces from text except for single
Dim CleanTrimRg As Range
Dim oCell As Range
Dim Func As WorksheetFunction
Set Func = Application.WorksheetFunction
On Error Resume Next
If Err Then MsgBox "No data to clean and Trim!": Exit Sub
For Each oCell In Excel.Selection
If .HasFormula = False Then
oCell = Func.Clean(Func.Trim(oCell))