Sub Clean_Trim() 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 With oCell If .HasFormula = False Then oCell = Func.Clean(Func.Trim(oCell)) End If End With Next End Sub
|Can I reduce the fonts available by excel or visio for one project, but enable the full set of fonts for all other purposes?||8||35|
|highlight duplicate entry||16||30|
|sql server query from excel||3||57|
|Access Excel export not behaving||2||27|
Join the community of 500,000 technology professionals and ask your questions.
Connect with top rated Experts
21 Experts available now in Live!