How to apply CLEAN () formula to whole Excel sheet?
3 answers
I don't see it visually. If you see this character at the end of the cell text, you can find this value using the below code
debug.Print asc(right(range("D1").Value,1))
Just replace 110 with this value in the code below.
Sub Sample()
Dim ws As Worksheet
'~~> Set this to the relevant worksheet
Set ws = ThisWorkbook.Sheets("Sheet1")
ws.Cells.Replace What:=Chr(110), Replacement:="", LookAt:=xlPart, SearchOrder _
:=xlByRows, MatchCase:=False, SearchFormat:=False, ReplaceFormat:=False
End Sub
HERE is the ASCII table for your reference.
+4
source to share