回答編集履歴

3

【頁No.1】

2020/08/21 00:01

投稿

tosi
tosi

スコア553

test CHANGED
@@ -1,3 +1,5 @@
1
+ 【頁No.1】
2
+
1
3
  ![概要](82676e0db9e61a597df7b78fbc7099c4.jpeg)
2
4
 
3
5
  ```VBA

2

123

2020/08/21 00:01

投稿

tosi
tosi

スコア553

test CHANGED
@@ -193,3 +193,5 @@
193
193
  Private varSortWork As Variant
194
194
 
195
195
  ```
196
+
197
+ 続きあり

1

修正

2020/08/15 21:39

投稿

tosi
tosi

スコア553

test CHANGED
@@ -30,4 +30,166 @@
30
30
 
31
31
  Private Const str結果域 As String = "D3:M10"
32
32
 
33
+
34
+
35
+ 'Work領域
36
+
37
+ Private mblnMaster As Boolean
38
+
39
+ Private mintArCnt As Integer
40
+
41
+ Private mintCount As Integer
42
+
43
+ Private mMyRange As Range
44
+
45
+ Private mlRow1 As Long
46
+
47
+ Private mlRow2 As Long
48
+
49
+ Private mlCol1 As Long
50
+
51
+ Private mlCol2 As Long
52
+
53
+ Private mvarResData As Variant
54
+
55
+ Private mvarRecord As Variant
56
+
57
+ Private mdblKingaku As Double
58
+
59
+
60
+
61
+ 'WorkData領域
62
+
63
+ Private mlngDataCnt As Long
64
+
65
+ Private mlngDataHitRecord As Long
66
+
67
+
68
+
69
+ 'WorkRange領域
70
+
71
+ Private rng商品域 As Range
72
+
73
+ Private rng予算域 As Range
74
+
75
+ Private rng結果域 As Range
76
+
77
+
78
+
79
+ 'MasterType領域
80
+
81
+ Private Type 商品Record
82
+
83
+ strM名称 As String
84
+
85
+ dblM金額 As Double
86
+
87
+ intM優先 As Integer
88
+
89
+ intM期限 As Integer
90
+
91
+ lngM行番 As Long
92
+
93
+ int計上件数 As Integer
94
+
95
+ int期限区分 As Integer '1=購入期限到達品 9=購入期限未達品
96
+
97
+ int期限日数 As Integer
98
+
99
+ int順位作成 As Integer
100
+
101
+ End Type
102
+
103
+ Private M商品() As 商品Record
104
+
105
+
106
+
107
+ Private Type 予算Record
108
+
109
+ int日目値 As Integer
110
+
111
+ lng列位置 As Long
112
+
113
+ End Type
114
+
115
+ Private M予算() As 予算Record
116
+
117
+
118
+
119
+ Private Type 誤差Record
120
+
121
+ dblMst誤差小 As Double
122
+
123
+ dblMst誤差大 As Double
124
+
125
+ dbl合計金額 As Double
126
+
127
+ dbl予算金額 As Double
128
+
129
+ dbl下限金額 As Double
130
+
131
+ dbl上限金額 As Double
132
+
133
+ End Type
134
+
135
+ Private M誤差 As 誤差Record
136
+
137
+
138
+
139
+ 'DataType領域
140
+
141
+ Private Type 明細Record
142
+
143
+ str商品名称 As String
144
+
145
+ int期限区分 As Integer
146
+
147
+ int計上件数 As Integer
148
+
149
+ int優先順位 As Integer
150
+
151
+ lngセル行番 As Long
152
+
153
+ End Type
154
+
155
+ Private Type DataRecord
156
+
157
+ strPattern As String
158
+
159
+ str期限Key As String
160
+
161
+ str件数Key As String
162
+
163
+ str優先Key As String
164
+
165
+ dbl合計金額 As Double
166
+
167
+ Rec明細() As 明細Record
168
+
169
+ End Type
170
+
171
+ Private RData() As DataRecord
172
+
173
+
174
+
175
+ '自己参照Work域
176
+
177
+ Private gintLayer As Integer
178
+
179
+ Private giCountMax As Integer
180
+
181
+ Private giLayerMax As Integer
182
+
183
+
184
+
185
+ 'ソート領域
186
+
187
+ Private lSortX As Long
188
+
189
+ Private lSortY As Long
190
+
191
+ Private varSortAry() As Variant
192
+
193
+ Private varSortWork As Variant
194
+
33
195
  ```