-
Notifications
You must be signed in to change notification settings - Fork 0
/
uc-setup.vb
53 lines (52 loc) · 1.69 KB
/
uc-setup.vb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
Sub UCSetup()
'
' UC SETUP
' TODO: change over from select statements to direct action on cells to speed up macro performance
'
Application.DisplayAlerts = False
Sheets("Receivables Radius Export").Select
ActiveWorkbook.Worksheets("Receivables Radius Export").AutoFilter.Sort. _
SortFields.Clear
Sheets("V3BD").Select
ActiveWorkbook.Worksheets("V3BD").AutoFilter.Sort. _
SortFields.Clear
Rows("2:2").Select
Range(Selection, Selection.End(xlDown)).Select
Selection.Copy
Sheets("Receivables Radius Export").Select
Range("A1").Select
Selection.End(xlDown).Select
ActiveCell.Offset(1, 0).Range("A1").Select
ActiveSheet.Paste
Application.Goto Reference:="R1C1"
Rows("1:1").Select
With Selection.Font
.ColorIndex = xlAutomatic
.TintAndShade = 0
End With
ActiveSheet.Range("$A$1:$AH$9999").AutoFilter Field:=9, Criteria1:="STL19"
Sheets("Receivables Radius Export").Select
Sheets("Receivables Radius Export").Name = "UC"
Sheets("V3BD").Select
ActiveWindow.SelectedSheets.Delete
Sheets("UC").Select
Columns("J:J").Select
Selection.Insert Shift:=xlToRight, CopyOrigin:=xlFormatFromLeftOrAbove
With Selection
.HorizontalAlignment = xlCenter
.VerticalAlignment = xlBottom
.WrapText = False
.Orientation = 0
.AddIndent = False
.IndentLevel = 0
.ShrinkToFit = False
.ReadingOrder = xlContext
.MergeCells = False
End With
Columns("J:J").EntireColumn.AutoFit
Selection.NumberFormat = "0"
Range("J1").Select
Selection.FormulaArray = "PU Control"
Range("A1").Select
Application.DisplayAlerts = True
End Sub