MatthewLane412
New Member
- Joined
- Aug 23, 2017
- Messages
- 24
Hello,
I am trying to remove all character in column AK that exceed 14 character in length. I found some code online which works for column A only. I have been working on trying to get it to work with Column AK.
lastrow= Range ("A20000").End(xlUp)Row
For I = 1 To lastrow
If Len(Cells(I, 1)) >14 Then
Cells (I, 1) = Left (Cells (I, 1), 14)
End If
Next I
I was thinking code similar to this could work but I had no success.
Dim finRow As a String
finRow = Sheets("Data").Range("A20000").End(xlUp).Row
Set myRange = Sheets ("Data").Range (AK2:AK" & finRow)
Thank you for taking a look.
I am trying to remove all character in column AK that exceed 14 character in length. I found some code online which works for column A only. I have been working on trying to get it to work with Column AK.
lastrow= Range ("A20000").End(xlUp)Row
For I = 1 To lastrow
If Len(Cells(I, 1)) >14 Then
Cells (I, 1) = Left (Cells (I, 1), 14)
End If
Next I
I was thinking code similar to this could work but I had no success.
Dim finRow As a String
finRow = Sheets("Data").Range("A20000").End(xlUp).Row
Set myRange = Sheets ("Data").Range (AK2:AK" & finRow)
Thank you for taking a look.