Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- https://excel-egy.com/forum/t4240
- ---------------------------------
- Sub Split_Text_By_Delimiter_Into_Two_Columns()
- Dim a, x, i As Long
- a = Range("E2:F" & Cells(Rows.Count, "E").End(xlUp).Row).Value
- For i = LBound(a) To UBound(a)
- If InStr(a(i, 1), "-") Then
- x = Split(a(i, 1), "-")
- a(i, 1) = Trim(x(0))
- a(i, 2) = Trim(x(1))
- End If
- Next i
- Range("E2").Resize(UBound(a, 1), UBound(a, 2)).Value = a
- End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement