Delete characters from behind if too many
Give this macro a try....
Sub LeaveOnly10CharactersOrDigits()
Dim Cols As Range
Const RangeToProcess As String = "C3:F9"
For Each Cols In Range(RangeToProcess).Columns
Cols.TextToColumns Intersect(Cols, Range(RangeToProcess)), _
xlFixedWidth, FieldInfo:=Array(Array(0, xlGeneralFormat), _
Array(10, xlSkipColumn))
Next
End Sub
Rick Rothstein (MVP - Excel)
|