Advertisement
Guest User

Untitled

a guest
Sep 29th, 2016
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.22 KB | None | 0 0
  1. Dim sSheetName As String
  2. Dim sDataRange As String
  3.  
  4. sSheetName = ActiveSheet.Name
  5. sDataRange = Selection.Address
  6.  
  7. Range("A2015:A2040").Select
  8. Selection.TextToColumns Destination:=Range("A2015"), DataType:=xlFixedWidth, _
  9. FieldInfo:=Array(Array(0, 1), Array(6, 1), Array(15, 1), Array(39, 1), Array(53, 1), _
  10. Array(60, 1), Array(73, 1), Array(94, 1), Array(108, 1)), TrailingMinusNumbers:=True
  11. Worksheets("Sheet1").Range("A2015:P2040").Columns.AutoFit
  12. Range("A2015:A2018").Select
  13. Application.Run "PERSONAL.XLSB!MergingCells"
  14. Range("B2015:B2018").Select
  15. Application.Run "PERSONAL.XLSB!MergingCells"
  16. Range("C2015:C2018").Select
  17. Application.Run "PERSONAL.XLSB!MergingCells"
  18. Range("D2015:D2018").Select
  19. Application.Run "PERSONAL.XLSB!MergingCells"
  20. Range("E2015:E2018").Select
  21. Application.Run "PERSONAL.XLSB!MergingCells"
  22. Range("F2015:F2018").Select
  23. Application.Run "PERSONAL.XLSB!MergingCells"
  24. Range("G2015:G2018").Select
  25. Application.Run "PERSONAL.XLSB!MergingCells"
  26. Range("H2015:H2018").Select
  27. Application.Run "PERSONAL.XLSB!MergingCells"
  28. Range("I2015:I2018").Select
  29. Application.Run "PERSONAL.XLSB!MergingCells"
  30. ActiveSheet.ListObjects.Add(xlSrcRange, Range("$A$2015:$I$2040"), , xlYes).Name _
  31. = "Table15"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement