Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I Have written the function below to remove some non printable characters
from my WORKBOOK. However when I run the code it delete all entries from my worksheets. Sub Clean() Dim j As Integer Dim vAddText Application.DisplayAlerts = False Application.StatusBar = "Starting cleaning of workbook " & Application.ActiveWorkbook.FullName On Error GoTo 0 vAddText = Array(Chr(129), Chr(141), Chr(143), Chr(144), Chr(157)) For J = 1 To 31 If J < 10 Then Cells.Replace What:=Chr(J), Replacement:="", LookAt:=xlPart, _ SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _ ReplaceFormat:=False Next For J = 0 To UBound(vAddText) Cells.Replace What:=vAddText(J), Replacement:="", LookAt:=xlPart, _ SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _ ReplaceFormat:=False Next Application.StatusBar = "Ending cleaning of workbook " & Application.ActiveWorkbook.FullName Application.DisplayAlerts = True End Sub -- George, Southampton, UK |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Checking characters , non-printable etc. | Excel Discussion (Misc queries) | |||
Search and replace for non printable characters | Excel Programming | |||
Replace non printable characters | Excel Worksheet Functions | |||
Viewing non-printable characters | Excel Discussion (Misc queries) | |||
Replacing Non Printable Characters | Excel Programming |