Hello!
I have this code:
Private Sub Worksheet_Change(ByVal Target As Range)
Dim strTarget As String, lngLen As Long, intRep As Integer, i As Integer
Const intSplit As Integer = 63
If Intersect(Target, Range("A:A")) Is Nothing Or Target.Count > 1 Then Exit Sub
If Len(Target.Value) > intSplit Then
strTarget = Target.Value
lngLen = Len(strTarget)
intRep = Int(lngLen / intSplit) + 1
For i = 1 To intRep
Target.Offset(i - 1, 0).Value = Mid(strTarget, (i - 1) * intSplit + 1, intSplit)
Next i
End If
End Sub
The way it is coded now, the text will wrap to the cell below (which is what I want), but it splits words when it hits 63 characters. Does anyone know how to change it so it wraps full words (<=63 characters)???? Please help!
Thank you!
Autumn
I have this code:
Private Sub Worksheet_Change(ByVal Target As Range)
Dim strTarget As String, lngLen As Long, intRep As Integer, i As Integer
Const intSplit As Integer = 63
If Intersect(Target, Range("A:A")) Is Nothing Or Target.Count > 1 Then Exit Sub
If Len(Target.Value) > intSplit Then
strTarget = Target.Value
lngLen = Len(strTarget)
intRep = Int(lngLen / intSplit) + 1
For i = 1 To intRep
Target.Offset(i - 1, 0).Value = Mid(strTarget, (i - 1) * intSplit + 1, intSplit)
Next i
End If
End Sub
The way it is coded now, the text will wrap to the cell below (which is what I want), but it splits words when it hits 63 characters. Does anyone know how to change it so it wraps full words (<=63 characters)???? Please help!
Thank you!
Autumn