View Single Post
  #8   Report Post  
Posted to microsoft.public.excel.programming
Scott Wagner Scott Wagner is offline
external usenet poster
 
Posts: 82
Default VBA Question (rookie issue)

That did it! Thanks to all for helping with this.

Here is the final macro:

Sub FixDescription()
Dim rng As Range, cell As Range, iloc As Long
Set rng = Range(Cells(2, 3), Cells(Rows.Count, 3).End(xlUp))
For Each cell In rng
iloc = InStr(1, cell, " ", vbTextCompare)
If iloc < 0 Then
cell.Offset(0, 1).Value = Mid(cell.Value, iloc + 1, 255)
cell.Value = Mid(cell, 1, iloc - 1)

End If
Next
End Sub