Guest User

Untitled

a guest
Feb 16th, 2019
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. Sub sort()
  2. Dim rArea As Range, lRow As Long, oCN As Long
  3. 'Set this to the range of names
  4. Set rArea = ActiveSheet.Range("C2:G4")
  5. 'Set this to output
  6. outColumn = "J"
  7.  
  8. oCN = Columns(outColumn).Column
  9. For Each cv In rArea
  10. lRow = ActiveSheet.Range(outColumn & ActiveSheet.Rows.Count).End(xlUp).Row
  11. Cells(lRow + 1, oCN).Value = cv.Value
  12. Cells(lRow + 1, oCN - 1).Value = Cells(cv.Row, 2).Value
  13. Next cv
  14.  
  15. End Sub
Add Comment
Please, Sign In to add comment