Excel VBA

Excel VBA
Excel Formulas
User-defined Functions
Office Links
Access VBA
Access SQL
Alan’s Excel FAQ
Excel Home
Alan’s Home

Clean up Import

Cleaning up those non-printing ASCII characters after a text import.

Sub Cleaning()
Dim RowCount As Long, CountCol As Long, Sheet as Object
Set Sheet = Application.ActiveSheet
For CountRow = 1 To 20
    For CountCol = 1 To 20
        Sheet.Cells(CountRow, CountCol).Value =
Application.WorksheetFunction.Clean(Sheet.Cells(CountRow, CountCol).Value)
    Next CountCol
Next CountRow
End Sub



© 1999-2010

Updated:  05/27/2010 19:26
This page added:  01 May 1999