SHARE
TWEET

Untitled

a guest Jan 18th, 2019 57 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Sub WeeklyRoutine()
  2. '
  3. ' WeeklyRoutine Macro
  4. '
  5.  
  6. '
  7.     Sheets("PR Raw Data").Select
  8.     Columns("EN:EN").Select
  9.     Selection.TextToColumns Destination:=Range( _
  10.         "BurnData[[#Headers],[est_po_place]]"), DataType:=xlDelimited, TextQualifier _
  11.         :=xlDoubleQuote, ConsecutiveDelimiter:=False, Tab:=True, Semicolon:= _
  12.         False, Comma:=False, Space:=False, Other:=False, FieldInfo:=Array(1, 3) _
  13.         , TrailingMinusNumbers:=True
  14.     Range("EN2").Select
  15.     ActiveWorkbook.Worksheets("PR Raw Data").ListObjects("BurnData").Sort. _
  16.         SortFields.Clear
  17.     ActiveWorkbook.Worksheets("PR Raw Data").ListObjects("BurnData").Sort. _
  18.         SortFields.Add Key:=Range("EN2"), SortOn:=xlSortOnValues, Order:= _
  19.         xlAscending, DataOption:=xlSortNormal
  20.     With ActiveWorkbook.Worksheets("PR Raw Data").ListObjects("BurnData").Sort
  21.         .Header = xlYes
  22.         .MatchCase = False
  23.         .Orientation = xlTopToBottom
  24.         .SortMethod = xlPinYin
  25.         .Apply
  26.     End With
  27.     Sheets("Current Week - SMPP Data").Select
  28.     Columns("C:C").Select
  29.     Selection.TextToColumns Destination:=Range("SMPPTrend[[#Headers],[PR]]"), _
  30.         DataType:=xlDelimited, TextQualifier:=xlDoubleQuote, ConsecutiveDelimiter _
  31.         :=False, Tab:=True, Semicolon:=False, Comma:=False, Space:=False, _
  32.         Other:=False, FieldInfo:=Array(1, 1), TrailingMinusNumbers:=True
  33.     Columns("I:I").Select
  34.     Selection.TextToColumns Destination:=Range("SMPPTrend[[#Headers],[PR Age]]") _
  35.         , DataType:=xlDelimited, TextQualifier:=xlDoubleQuote, _
  36.         ConsecutiveDelimiter:=False, Tab:=True, Semicolon:=False, Comma:=False _
  37.         , Space:=False, Other:=False, FieldInfo:=Array(1, 1), _
  38.         TrailingMinusNumbers:=True
  39.     Columns("H:H").Select
  40.     Selection.TextToColumns Destination:=Range( _
  41.         "SMPPTrend[[#Headers],[Est PO Place Dt]]"), DataType:=xlDelimited, _
  42.         TextQualifier:=xlDoubleQuote, ConsecutiveDelimiter:=False, Tab:=True, _
  43.         Semicolon:=False, Comma:=False, Space:=False, Other:=False, FieldInfo _
  44.         :=Array(1, 3), TrailingMinusNumbers:=True
  45.     Selection.NumberFormat = "m/d/yyyy"
  46.     Range("H2").Select
  47.     ActiveWorkbook.Worksheets("Current Week - SMPP Data").ListObjects("SMPPTrend"). _
  48.         Sort.SortFields.Clear
  49.     ActiveWorkbook.Worksheets("Current Week - SMPP Data").ListObjects("SMPPTrend"). _
  50.         Sort.SortFields.Add Key:=Range("H2"), SortOn:=xlSortOnValues, Order:= _
  51.         xlAscending, DataOption:=xlSortNormal
  52.     With ActiveWorkbook.Worksheets("Current Week - SMPP Data").ListObjects( _
  53.         "SMPPTrend").Sort
  54.         .Header = xlYes
  55.         .MatchCase = False
  56.         .Orientation = xlTopToBottom
  57.         .SortMethod = xlPinYin
  58.         .Apply
  59.     End With
  60. 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