View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
sivak sivak is offline
external usenet poster
 
Posts: 4
Default 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