Monday, May 12, 2008

Remove tabulation from an Excel file

Just a simple routine to remove "Tab characters" from an excel file:

Sub RemoveTab()
Dim MyCell As Range
For Each MyCell In Selection
Dim a As String
a = MyCell.Text
a = Replace(a, Chr(9), "")
MyCell.Value = a
Next MyCell
End Sub