splitting a string
Try this.
Dim coupon
Dim collat, pos As Integer
cellval = Sheets("temp").Cells(Row, 5).Value
pos = InStr(cellval, "/")
If pos 0 Then
collat = Mid(cellval, pos + 1)
coupon = Mid(cellval, 1, pos - 1)
MsgBox coupon & ", " & collat
End If
|