Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- one@example.com, two@example.com, three@example.com
- one@example.com
- two@example.com
- three@example.com
- if (cell contains ", ")
- get string from ", " to ", " and paste somehow
- else "b1"
- %s/,/\n/g
- Cells(1, 1).Select
- Dim curr As String
- Dim cnt As Integer
- cnt = 0
- For i = 1 To ActiveCell.SpecialCells(xlLastCell).Row
- curr = Cells(i, 1).Value
- If InStr(curr, "@") Then
- If InStr(curr, ",") Then
- Dim tmp() As String
- tmp = Split(curr, ",")
- For j = LBound(tmp) To UBound(tmp)
- cnt = cnt + 1
- Cells(cnt, 2).Value = tmp(j)
- Next
- Else
- cnt = cnt + 1
- Cells(cnt, 2).Value = curr
- End If
- End If
- Next i
Add Comment
Please, Sign In to add comment