SHARE
TWEET

Untitled

a guest Feb 16th, 2019 66 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top