-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathReset.bas
166 lines (164 loc) · 5.57 KB
/
Reset.bas
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
Attribute VB_Name = "Reset"
Sub ResetNewest1()
Attribute ResetNewest1.VB_ProcData.VB_Invoke_Func = " \n14"
'
' ResetNewest1 Macro
'
'
Range("A10").Select
ActiveCell.FormulaR1C1 = ""
Range("A12").Select
ActiveCell.FormulaR1C1 = ""
Range("A13").Select
ActiveCell.FormulaR1C1 = ""
Range("A14").Select
ActiveCell.FormulaR1C1 = ""
Range("A15").Select
ActiveCell.FormulaR1C1 = ""
Range("A18").Select
ActiveCell.FormulaR1C1 = ""
Range("C34").Select
Sheets("Background").Select
Columns("S:S").Select
Selection.ClearContents
Range("B2:C2").Select
Range(Selection, Selection.End(xlDown)).Select
Selection.ClearContents
Range("F2:G2").Select
Selection.AutoFill Destination:=Range("F2:G300"), Type:=xlFillDefault
Range("F2:G300").Select
Range("J299").Select
ActiveWindow.SmallScroll Down:=-27
ActiveWindow.ScrollRow = 1
Range("H2").Select
Range(Selection, Selection.End(xlDown)).Select
Selection.ClearContents
Range("K2:L2").Select
Selection.AutoFill Destination:=Range("K2:L300"), Type:=xlFillDefault
Range("K2:L300").Select
Range("N308").Select
ActiveWindow.ScrollRow = 1
Sheets("Input-Results").Select
Range("B3").Select
ActiveCell.FormulaR1C1 = ""
Range("B4").Select
ActiveCell.FormulaR1C1 = ""
Range("B5").Select
ActiveCell.FormulaR1C1 = ""
Range("B6").Select
ActiveCell.FormulaR1C1 = ""
Range("D3:E3").Select
Range(Selection, Selection.End(xlDown)).Select
Selection.ClearContents
Range("H19").Select
End Sub
Sub FPnewest1()
Attribute FPnewest1.VB_ProcData.VB_Invoke_Func = " \n14"
'
' FPnewest1 Macro
'
'
Range("D3:E3").Select
Range(Selection, Selection.End(xlDown)).Select
Selection.Copy
Sheets("Background").Select
Range("B2").Select
ActiveSheet.Paste
Columns("F:G").Select
Application.CutCopyMode = False
ActiveSheet.Range("$F$1:$G$1048575").RemoveDuplicates Columns:=Array(1, 2), _
Header:=xlYes
ActiveWindow.LargeScroll Down:=6
Range("F301:G301").Select
Range(Selection, Selection.End(xlUp)).Select
Selection.ClearContents
ActiveWindow.ScrollRow = 1
Range("G2").Select
Range(Selection, Selection.End(xlDown)).Select
Selection.Copy
Range("H2").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Application.CutCopyMode = False
ActiveWorkbook.Worksheets("Background").Sort.SortFields.Clear
ActiveWorkbook.Worksheets("Background").Sort.SortFields.Add Key:=Range("H2") _
, SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:=xlSortNormal
With ActiveWorkbook.Worksheets("Background").Sort
.SetRange Range("H2:H21")
.Header = xlGuess
.MatchCase = False
.Orientation = xlTopToBottom
.SortMethod = xlPinYin
.Apply
End With
Columns("K:L").Select
ActiveSheet.Range("$K$1:$L$1048575").RemoveDuplicates Columns:=Array(1, 2), _
Header:=xlYes
Range("R2:R300").Select
Selection.Copy
Range("S1").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Application.CutCopyMode = False
ActiveWorkbook.Worksheets("Background").Sort.SortFields.Clear
ActiveWorkbook.Worksheets("Background").Sort.SortFields.Add Key:=Range("S1") _
, SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:=xlSortNormal
With ActiveWorkbook.Worksheets("Background").Sort
.SetRange Range("S1:S299")
.Header = xlGuess
.MatchCase = False
.Orientation = xlTopToBottom
.SortMethod = xlPinYin
.Apply
End With
ActiveSheet.ChartObjects("Chart 5").Activate
ActiveSheet.ChartObjects("Chart 5").Activate
Range("X5").Select
Selection.Copy
Sheets("Input-Results").Select
Range("A18").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Range("C32").Select
Sheets("Background").Select
Range("U1").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Input-Results").Select
Range("A10").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Sheets("Background").Select
Range("U3").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Input-Results").Select
Range("A12").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Sheets("Background").Select
Range("U5").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Input-Results").Select
Range("A13").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Sheets("Background").Select
Range("U7").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Input-Results").Select
Range("A14").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Sheets("Background").Select
Range("U9").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Input-Results").Select
Range("A15").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Range("I26").Select
End Sub