Hi,
Thanks to all who helped.
With the help this is the final code that I came up with.
Code:Sub Refseq() Dim Mval As String Dim i As Long Dim lrow As Long Sheets("Sheet2").Activate lrow = Sheets("Sheet2").Range("A65536").End(xlUp).Row For i = 2 To lrow Range("G" & i) = Range("F" & i) & ":" & CSPLIT(Range("B" & i)) Next End Sub Function CSPLIT(strPassed As String) As String Dim str, strP As String strP = Split(strPassed, ";")(0) str = Split(strP, ">")(0) & ">" If InStr(1, Split(strPassed, ";")(0), "/") Then str = str & Split(Split(strPassed, ";")(0), "/")(1) Else str = str & Right(Split(strPassed, ";")(0), 1) End If CSPLIT = str End Function




Reply With Quote
Bookmarks