limiting characters in a cell
Hi,
This operates on all pasted cells in columns 2,3,4,5,8 and 9. Just edit
to suit your needs
Private Sub Worksheet_Change(ByVal Target As Range)
Select Case Target.Column
Case 2, 3, 4, 5, 8, 9
Application.EnableEvents = False
Dim rngCell As Range
On Error Resume Next
For Each rngCell In Target
rngCell.Value = Left(rngCell.Value, 10)
Next rngCell
Application.EnableEvents = True
Case Else
End Select
End Sub
Ken Johnson
|