Guest User

Untitled

a guest
Jun 22nd, 2018
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. Sub Vertical()
  2. Dim i As Long, st As String
  3. i = 1
  4. Dim startP As Range
  5. For Each r In Selection
  6. If i = 1 Then
  7. st = r.Text
  8. i = 2
  9. Else
  10. st = st & "," & r.Text
  11. End If
  12. Next r
  13.  
  14. Set startP = Selection(1, 2)
  15. ary = Split(st, ",")
  16. i = 1
  17. For Each a In ary
  18. startP(i, 1).Value = a
  19. i = i + 1
  20. Next a
  21. End Sub
Add Comment
Please, Sign In to add comment