Hi EC,
Supposing your data is in Col A then a
formula version could be placed in Col ?
VB: AutoLinked keywords will cause extra spaces before keywords. Extra spacing is NOT transferred when
copy/pasting, but IS if the keyword uses "quotes".
=If(LEN(A1)>55, LEFT(A1,55), A1)
This will echo a 55 char string from Col A. To trim it to values you would use Copy/Patespecial/Values/
A VBA version would be:
VB: AutoLinked keywords will cause extra spaces before keywords. Extra spacing is NOT transferred when copy/pasting, but IS if the keyword uses "quotes".
Sub fiftyfive()
lastrow =
Range("a65536").End(xlUp).Row
For i = 1
To lastrow
If Len(Cells(i, 1)) > 55
Then
Cells(i, 1) = Left(Cells(i, 1), 55)
End If
Next i
End Sub
This version would replace the original values. Change the line:
VB: AutoLinked keywords will cause extra spaces before keywords. Extra spacing is NOT transferred when copy/pasting, but IS if the keyword uses "quotes".
Cells(i, 1) = Left(Cells(i, 1), 55)
To
Cells(i, 2) = Left(Cells(i, 1), 55)
and it adds the new values to Col B...
Cheers,
dr