Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Sub design_sort()
- '
- ' design_sort Macro
- '
- Sheets("Status Tracking").Select
- Dim LastColumnInRow2 As Variant
- LastColumnInRow2 = Cells(2, Columns.Count).End(xlToLeft).Column
- Range(Cells(2, 3), Cells(9, LastColumnInRow2)).Select
- Selection.Copy
- Sheets("DESIGN_SORT").Select
- Range("C2").Select
- Selection.PasteSpecial Paste:=xlPasteAll, Operation:=xlNone, SkipBlanks:= _
- False, Transpose:=False
- Sheets("Status Tracking").Select
- Range(Cells(10, 2), Cells(16, LastColumnInRow2)).Select
- Application.CutCopyMode = False
- Selection.Copy
- Sheets("DESIGN_SORT").Select
- Range("B10").Select
- Selection.PasteSpecial Paste:=xlPasteAll, Operation:=xlNone, SkipBlanks:= _
- False, Transpose:=False
- Range(Cells(2, 2), Cells(16, LastColumnInRow2)).Select
- Application.CutCopyMode = False
- ActiveWorkbook.Worksheets("DESIGN_SORT").sort.SortFields.Clear
- ActiveWorkbook.Worksheets("DESIGN_SORT").sort.SortFields.Add Key:=Range( _
- Cells(14, 4), Cells(14, LastColumnInRow2)), SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:= _
- xlSortNormal
- With ActiveWorkbook.Worksheets("DESIGN_SORT").sort
- .SetRange Range(Cells(1, 4), Cells(17, LastColumnInRow2))
- .Header = xlGuess
- .MatchCase = False
- .Orientation = xlLeftToRight
- .SortMethod = xlPinYin
- .Apply
- End With
- End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement