- Mar 5, 2009
- 259
- 0
- 42
Ok i am hoping i can get an answer before the end of the day lol *fingers crossed*
I am trying to cut the number of characters in a column down to a specific length.
I am no good at VB coding and really cant find anything that will hlp me do what i want lol.
I have worked out how to get it to cut the length down... but i cant get it to stop when it comes to an empty cell, it runs right through the 65k cells before stopping :s
here is the code i have
I am doing this to ease the workload abit @ work, and because things need to be specific, i cannot do it through formulas.
Would appreciate any help. ty x
EDIT ~~ sorted it
I am trying to cut the number of characters in a column down to a specific length.
I am no good at VB coding and really cant find anything that will hlp me do what i want lol.
I have worked out how to get it to cut the length down... but i cant get it to stop when it comes to an empty cell, it runs right through the 65k cells before stopping :s
here is the code i have
Code:
Sub Macro3()
'
' Macro3 Macro
'
'
Columns("A:A").Select
For Each cell In Selection
If IsEmpty(ActiveCell) = False Then
cell.Value = Left(cell.Value, 5)
Else
End If
Next cell
End Sub
I am doing this to ease the workload abit @ work, and because things need to be specific, i cannot do it through formulas.
Would appreciate any help. ty x
EDIT ~~ sorted it
Last edited: