Private Sub CommandButton5_Click()
Dim a As String
Dim ci As Integer
Dim lr&, col1&, col2&, i&, j&
ci = TextBox8
col1 = TextBox6: col2 = TextBox7
lr = ActiveSheet.Cells(Rows.Count, col1).End(xlUp).Row
For i = 2 To lr
[COLOR="Blue"] If ActiveSheet.Cells(i, col1).Value <> "" Then[/COLOR]
ActiveSheet.Cells(i, col2).Value = Left(ActiveSheet.Cells(i, col1), Len(ActiveSheet.Cells(i, col1)) - ci)
[COLOR="Blue"] End If [/COLOR]
Next i
End Sub