Public Sub BuildString()
Dim Cell As Range
Dim myLen As Integer
Dim rowNums As String
Dim firstLen As Integer
Dim lastRow As Integer
rowNums = InputBox("Please enter row numbers to copy")
If rowNums = "" Then Exit Sub
lastRow = CInt(rowNums)
For Each Cell In Selection
myLen = Len(Cell.Text)
If (myLen > 250) Then
firstLen = myLen / 2
Cells(lastRow, 4).Value = Left(Cell.Text, myLen / 2)
Cells(lastRow + 1, 4).Value = Mid(Cell.Text, firstLen + 1, myLen - firstLen)
lastRow = lastRow + 2
End If
Next Cell
End Sub
|