質問編集履歴
18
誤記
test
CHANGED
File without changes
|
test
CHANGED
@@ -45,123 +45,3 @@
|
|
45
45
|
|
46
46
|
|
47
47
|
```
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
修正
|
54
|
-
|
55
|
-
```VBA
|
56
|
-
|
57
|
-
Sub SetSeriesParameters(series as Series, lineColor as Integer, _
|
58
|
-
|
59
|
-
markerStyle as XlMarkerStyle, fillColor as Integer, _
|
60
|
-
|
61
|
-
bgColor as Integer, lineStyle as MsoLineDashStyle, _
|
62
|
-
|
63
|
-
Optional fillVisible as MsoTriState = msoTrue)
|
64
|
-
|
65
|
-
With series
|
66
|
-
|
67
|
-
.Format.Line.ForeColor.RGB = lineColor
|
68
|
-
|
69
|
-
.Fill.Visible = fillVisible
|
70
|
-
|
71
|
-
End With
|
72
|
-
|
73
|
-
End Sub
|
74
|
-
|
75
|
-
Sub 散布図作成()
|
76
|
-
|
77
|
-
Dim cht As Chart
|
78
|
-
|
79
|
-
Dim rng As Range
|
80
|
-
|
81
|
-
Dim rr As Range
|
82
|
-
|
83
|
-
Dim r As Range
|
84
|
-
|
85
|
-
Dim c As Long
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
With ActiveSheet
|
90
|
-
|
91
|
-
'A列範囲をSet
|
92
|
-
|
93
|
-
Set rng = .Range("A2", .Range("A2").End(xlDown))
|
94
|
-
|
95
|
-
Set cht = .Shapes.AddChart(xlXYScatterSmooth).Chart
|
96
|
-
|
97
|
-
End With
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
'A列の起点セルを覚えておきます
|
102
|
-
|
103
|
-
Set rr = rng(1)
|
104
|
-
|
105
|
-
'セル名ごとのデータ数count用
|
106
|
-
|
107
|
-
c = 1
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
'A列範囲をLoopします
|
112
|
-
|
113
|
-
For Each r In rng
|
114
|
-
|
115
|
-
If r.Value = r.Offset(1).Value Then
|
116
|
-
|
117
|
-
'1行下のセル名が同じならCountUp
|
118
|
-
|
119
|
-
c = c + 1
|
120
|
-
|
121
|
-
Else
|
122
|
-
|
123
|
-
'違ったら起点セルを基にグラフに系列追加
|
124
|
-
|
125
|
-
Set rr = rr.Resize(c, 3)
|
126
|
-
|
127
|
-
Dim series as Series
|
128
|
-
|
129
|
-
Set series cht.SeriesCollection.NewSeries
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
With series
|
134
|
-
|
135
|
-
.Name = rr(1)
|
136
|
-
|
137
|
-
.XValues = rr.Columns(3)
|
138
|
-
|
139
|
-
.Values = rr.Columns(4)
|
140
|
-
|
141
|
-
If Left(rr(1).Value, 6) = "A01_1A" And Right(rr(1).Value, 4) = "000a" Then
|
142
|
-
|
143
|
-
SetSeriesParameters series, vgRed, xlMarkerStyleTriangle, RGB(255, 0, 0), RGB(255, 0, 0), msoLineSolid
|
144
|
-
|
145
|
-
ElseIf Left(rr(1).Value, 6) = "A01_1A" And Right(rr(1).Value, 4) = "100a" Then
|
146
|
-
|
147
|
-
SetSeriesParameters series, vgRed, xlMarkerStyleTriangle, RGB(255, 0, 0), RGB(255, 0, 0), msoLineSolid, msoFalse
|
148
|
-
|
149
|
-
End If
|
150
|
-
|
151
|
-
End With
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
'起点セルとデータ数リセット
|
156
|
-
|
157
|
-
Set rr = r.Offset(1)
|
158
|
-
|
159
|
-
c = 1
|
160
|
-
|
161
|
-
End If
|
162
|
-
|
163
|
-
Next
|
164
|
-
|
165
|
-
End Sub
|
166
|
-
|
167
|
-
```
|
17
誤記
test
CHANGED
File without changes
|
test
CHANGED
@@ -1,12 +1,4 @@
|
|
1
1
|
VBAで系列名ごとに散布図を作成し、グラフを見やすくするためにあらかじめ線種とマーカを設定しようとしています。
|
2
|
-
|
3
|
-
系列名は AAA_BB_CCC_DDDとして
|
4
|
-
|
5
|
-
AAAで線の色、BBで直線と破線,点線
|
6
|
-
|
7
|
-
DDDでマーカーを設定。
|
8
|
-
|
9
|
-
|
10
2
|
|
11
3
|
下記でもグラフが作成できますが、本来ですと、もっと他の方法で書くのでしょうが、私には線種とマーカを設定について下記の方法しかコードの書き方が分かりません。
|
12
4
|
|
16
誤記
test
CHANGED
File without changes
|
test
CHANGED
@@ -40,13 +40,11 @@
|
|
40
40
|
|
41
41
|
.Format.Line.ForeColor.RGB = vbRed
|
42
42
|
|
43
|
-
.MarkerStyle = xlMarkerStyleTriangle
|
43
|
+
.MarkerStyle = xlMarkerStyleTriangle
|
44
44
|
|
45
45
|
.Format.Fill.ForeColor.RGB = RGB(255, 0, 0)
|
46
46
|
|
47
|
-
|
47
|
+
|
48
|
-
|
49
|
-
.Format.Line.DashStyle = msoLineSolid
|
50
48
|
|
51
49
|
|
52
50
|
|
15
修正
test
CHANGED
File without changes
|
test
CHANGED
@@ -12,9 +12,7 @@
|
|
12
12
|
|
13
13
|
|
14
14
|
|
15
|
-
すみませんが、今後もグラフ系列が増えてもいいような方法で、線種とマーカー部分についてコードを書きたいのですが、このコードでアドバイスを頂きたくよろしくお願いいたします。
|
16
15
|
|
17
|
-
また、少しでもコードの書き方を間違えなく、短くするためにAAA_BBが同じならDDDの部分で1本目はマーカーを塗りつぶし、2本目は、塗りつぶしなしにすればいいかと考えています。
|
18
16
|
|
19
17
|
|
20
18
|
|
14
修正
test
CHANGED
File without changes
|
test
CHANGED
@@ -34,51 +34,7 @@
|
|
34
34
|
|
35
35
|
|
36
36
|
|
37
|
-
|
37
|
+
|
38
|
-
|
39
|
-
'A列範囲をSet
|
40
|
-
|
41
|
-
Set rng = .Range("A2", .Range("A2").End(xlDown))
|
42
|
-
|
43
|
-
Set cht = .Shapes.AddChart(xlXYScatterSmooth).Chart
|
44
|
-
|
45
|
-
End With
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
'A列の起点セルを覚えておきます
|
50
|
-
|
51
|
-
Set rr = rng(1)
|
52
|
-
|
53
|
-
'セル名ごとのデータ数count用
|
54
|
-
|
55
|
-
c = 1
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
'A列範囲をLoopします
|
60
|
-
|
61
|
-
For Each r In rng
|
62
|
-
|
63
|
-
If r.Value = r.Offset(1).Value Then
|
64
|
-
|
65
|
-
'1行下のセル名が同じならCountUp
|
66
|
-
|
67
|
-
c = c + 1
|
68
|
-
|
69
|
-
Else
|
70
|
-
|
71
|
-
'違ったら起点セルを基にグラフに系列追加
|
72
|
-
|
73
|
-
Set rr = rr.Resize(c, 3)
|
74
|
-
|
75
|
-
With cht.SeriesCollection.NewSeries
|
76
|
-
|
77
|
-
.Name = rr(1)
|
78
|
-
|
79
|
-
.XValues = rr.Columns(3)
|
80
|
-
|
81
|
-
.Values = rr.Columns(4)
|
82
38
|
|
83
39
|
|
84
40
|
|
@@ -98,51 +54,11 @@
|
|
98
54
|
|
99
55
|
|
100
56
|
|
101
|
-
|
57
|
+
|
102
|
-
|
103
|
-
.Format.Line.ForeColor.RGB = vbRed
|
104
|
-
|
105
|
-
.MarkerStyle = xlMarkerStyleTriangle '△
|
106
|
-
|
107
|
-
.Format.Fill.ForeColor.RGB = RGB(255, 0, 0)
|
108
|
-
|
109
|
-
.MarkerBackgroundColor = RGB(255, 0, 0)
|
110
|
-
|
111
|
-
.Format.Line.DashStyle = msoLineSolid
|
112
|
-
|
113
|
-
.Fill.Visible = msoFalse
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
End If
|
120
|
-
|
121
|
-
End With
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
'起点セルとデータ数リセット
|
126
|
-
|
127
|
-
Set rr = r.Offset(1)
|
128
|
-
|
129
|
-
c = 1
|
130
|
-
|
131
|
-
End If
|
132
|
-
|
133
|
-
Next
|
134
|
-
|
135
|
-
End Sub
|
136
58
|
|
137
59
|
```
|
138
60
|
|
139
61
|
|
140
|
-
|
141
|
-
|系列名 | |X|Y|
|
142
|
-
|
143
|
-
|A01_1A_AAA_000a|A|10|10|
|
144
|
-
|
145
|
-
|A01_1A_AAA_100a|A|20|20|
|
146
62
|
|
147
63
|
|
148
64
|
|
13
誤記
test
CHANGED
File without changes
|
test
CHANGED
@@ -12,8 +12,6 @@
|
|
12
12
|
|
13
13
|
|
14
14
|
|
15
|
-
AAAだけでも20通りあり、AAA_BBとすると6文字から12文字になります。(下記コードは一部分)
|
16
|
-
|
17
15
|
すみませんが、今後もグラフ系列が増えてもいいような方法で、線種とマーカー部分についてコードを書きたいのですが、このコードでアドバイスを頂きたくよろしくお願いいたします。
|
18
16
|
|
19
17
|
また、少しでもコードの書き方を間違えなく、短くするためにAAA_BBが同じならDDDの部分で1本目はマーカーを塗りつぶし、2本目は、塗りつぶしなしにすればいいかと考えています。
|
@@ -116,107 +114,135 @@
|
|
116
114
|
|
117
115
|
|
118
116
|
|
119
|
-
|
120
|
-
|
121
|
-
|
117
|
+
|
122
|
-
|
118
|
+
|
123
|
-
|
119
|
+
End If
|
124
|
-
|
125
|
-
|
120
|
+
|
126
|
-
|
127
|
-
.Format.Fill.ForeColor.RGB = RGB(255, 0, 0)
|
128
|
-
|
129
|
-
.MarkerBackgroundColor = RGB(255, 0, 0)
|
130
|
-
|
131
|
-
|
121
|
+
End With
|
132
|
-
|
133
|
-
|
134
122
|
|
135
123
|
|
136
124
|
|
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
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
125
|
+
'起点セルとデータ数リセット
|
126
|
+
|
127
|
+
Set rr = r.Offset(1)
|
128
|
+
|
129
|
+
c = 1
|
130
|
+
|
131
|
+
End If
|
132
|
+
|
133
|
+
Next
|
134
|
+
|
135
|
+
End Sub
|
136
|
+
|
137
|
+
```
|
138
|
+
|
139
|
+
|
140
|
+
|
141
|
+
|系列名 | |X|Y|
|
142
|
+
|
143
|
+
|A01_1A_AAA_000a|A|10|10|
|
144
|
+
|
145
|
+
|A01_1A_AAA_100a|A|20|20|
|
146
|
+
|
147
|
+
|
148
|
+
|
149
|
+
修正
|
150
|
+
|
151
|
+
```VBA
|
152
|
+
|
153
|
+
Sub SetSeriesParameters(series as Series, lineColor as Integer, _
|
154
|
+
|
155
|
+
markerStyle as XlMarkerStyle, fillColor as Integer, _
|
156
|
+
|
157
|
+
bgColor as Integer, lineStyle as MsoLineDashStyle, _
|
158
|
+
|
159
|
+
Optional fillVisible as MsoTriState = msoTrue)
|
160
|
+
|
161
|
+
With series
|
162
|
+
|
163
|
+
.Format.Line.ForeColor.RGB = lineColor
|
164
|
+
|
165
|
+
.Fill.Visible = fillVisible
|
166
|
+
|
167
|
+
End With
|
168
|
+
|
169
|
+
End Sub
|
170
|
+
|
171
|
+
Sub 散布図作成()
|
172
|
+
|
173
|
+
Dim cht As Chart
|
174
|
+
|
175
|
+
Dim rng As Range
|
176
|
+
|
177
|
+
Dim rr As Range
|
178
|
+
|
179
|
+
Dim r As Range
|
180
|
+
|
181
|
+
Dim c As Long
|
182
|
+
|
183
|
+
|
184
|
+
|
185
|
+
With ActiveSheet
|
186
|
+
|
187
|
+
'A列範囲をSet
|
188
|
+
|
189
|
+
Set rng = .Range("A2", .Range("A2").End(xlDown))
|
190
|
+
|
191
|
+
Set cht = .Shapes.AddChart(xlXYScatterSmooth).Chart
|
192
|
+
|
193
|
+
End With
|
194
|
+
|
195
|
+
|
196
|
+
|
197
|
+
'A列の起点セルを覚えておきます
|
198
|
+
|
199
|
+
Set rr = rng(1)
|
200
|
+
|
201
|
+
'セル名ごとのデータ数count用
|
202
|
+
|
203
|
+
c = 1
|
204
|
+
|
205
|
+
|
206
|
+
|
207
|
+
'A列範囲をLoopします
|
208
|
+
|
209
|
+
For Each r In rng
|
210
|
+
|
211
|
+
If r.Value = r.Offset(1).Value Then
|
212
|
+
|
213
|
+
'1行下のセル名が同じならCountUp
|
214
|
+
|
215
|
+
c = c + 1
|
216
|
+
|
217
|
+
Else
|
218
|
+
|
219
|
+
'違ったら起点セルを基にグラフに系列追加
|
220
|
+
|
221
|
+
Set rr = rr.Resize(c, 3)
|
222
|
+
|
223
|
+
Dim series as Series
|
224
|
+
|
225
|
+
Set series cht.SeriesCollection.NewSeries
|
226
|
+
|
227
|
+
|
228
|
+
|
229
|
+
With series
|
230
|
+
|
231
|
+
.Name = rr(1)
|
232
|
+
|
233
|
+
.XValues = rr.Columns(3)
|
234
|
+
|
235
|
+
.Values = rr.Columns(4)
|
236
|
+
|
237
|
+
If Left(rr(1).Value, 6) = "A01_1A" And Right(rr(1).Value, 4) = "000a" Then
|
238
|
+
|
239
|
+
SetSeriesParameters series, vgRed, xlMarkerStyleTriangle, RGB(255, 0, 0), RGB(255, 0, 0), msoLineSolid
|
240
|
+
|
241
|
+
ElseIf Left(rr(1).Value, 6) = "A01_1A" And Right(rr(1).Value, 4) = "100a" Then
|
242
|
+
|
243
|
+
SetSeriesParameters series, vgRed, xlMarkerStyleTriangle, RGB(255, 0, 0), RGB(255, 0, 0), msoLineSolid, msoFalse
|
244
|
+
|
245
|
+
End If
|
220
246
|
|
221
247
|
End With
|
222
248
|
|
@@ -235,129 +261,3 @@
|
|
235
261
|
End Sub
|
236
262
|
|
237
263
|
```
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|系列名 | |X|Y|
|
242
|
-
|
243
|
-
|A01_1A_AAA_000a|A|10|10|
|
244
|
-
|
245
|
-
|A01_1A_AAA_100a|A|20|20|
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
修正
|
250
|
-
|
251
|
-
```VBA
|
252
|
-
|
253
|
-
Sub SetSeriesParameters(series as Series, lineColor as Integer, _
|
254
|
-
|
255
|
-
markerStyle as XlMarkerStyle, fillColor as Integer, _
|
256
|
-
|
257
|
-
bgColor as Integer, lineStyle as MsoLineDashStyle, _
|
258
|
-
|
259
|
-
Optional fillVisible as MsoTriState = msoTrue)
|
260
|
-
|
261
|
-
With series
|
262
|
-
|
263
|
-
.Format.Line.ForeColor.RGB = lineColor
|
264
|
-
|
265
|
-
.Fill.Visible = fillVisible
|
266
|
-
|
267
|
-
End With
|
268
|
-
|
269
|
-
End Sub
|
270
|
-
|
271
|
-
Sub 散布図作成()
|
272
|
-
|
273
|
-
Dim cht As Chart
|
274
|
-
|
275
|
-
Dim rng As Range
|
276
|
-
|
277
|
-
Dim rr As Range
|
278
|
-
|
279
|
-
Dim r As Range
|
280
|
-
|
281
|
-
Dim c As Long
|
282
|
-
|
283
|
-
|
284
|
-
|
285
|
-
With ActiveSheet
|
286
|
-
|
287
|
-
'A列範囲をSet
|
288
|
-
|
289
|
-
Set rng = .Range("A2", .Range("A2").End(xlDown))
|
290
|
-
|
291
|
-
Set cht = .Shapes.AddChart(xlXYScatterSmooth).Chart
|
292
|
-
|
293
|
-
End With
|
294
|
-
|
295
|
-
|
296
|
-
|
297
|
-
'A列の起点セルを覚えておきます
|
298
|
-
|
299
|
-
Set rr = rng(1)
|
300
|
-
|
301
|
-
'セル名ごとのデータ数count用
|
302
|
-
|
303
|
-
c = 1
|
304
|
-
|
305
|
-
|
306
|
-
|
307
|
-
'A列範囲をLoopします
|
308
|
-
|
309
|
-
For Each r In rng
|
310
|
-
|
311
|
-
If r.Value = r.Offset(1).Value Then
|
312
|
-
|
313
|
-
'1行下のセル名が同じならCountUp
|
314
|
-
|
315
|
-
c = c + 1
|
316
|
-
|
317
|
-
Else
|
318
|
-
|
319
|
-
'違ったら起点セルを基にグラフに系列追加
|
320
|
-
|
321
|
-
Set rr = rr.Resize(c, 3)
|
322
|
-
|
323
|
-
Dim series as Series
|
324
|
-
|
325
|
-
Set series cht.SeriesCollection.NewSeries
|
326
|
-
|
327
|
-
|
328
|
-
|
329
|
-
With series
|
330
|
-
|
331
|
-
.Name = rr(1)
|
332
|
-
|
333
|
-
.XValues = rr.Columns(3)
|
334
|
-
|
335
|
-
.Values = rr.Columns(4)
|
336
|
-
|
337
|
-
If Left(rr(1).Value, 6) = "A01_1A" And Right(rr(1).Value, 4) = "000a" Then
|
338
|
-
|
339
|
-
SetSeriesParameters series, vgRed, xlMarkerStyleTriangle, RGB(255, 0, 0), RGB(255, 0, 0), msoLineSolid
|
340
|
-
|
341
|
-
ElseIf Left(rr(1).Value, 6) = "A01_1A" And Right(rr(1).Value, 4) = "100a" Then
|
342
|
-
|
343
|
-
SetSeriesParameters series, vgRed, xlMarkerStyleTriangle, RGB(255, 0, 0), RGB(255, 0, 0), msoLineSolid, msoFalse
|
344
|
-
|
345
|
-
End If
|
346
|
-
|
347
|
-
End With
|
348
|
-
|
349
|
-
|
350
|
-
|
351
|
-
'起点セルとデータ数リセット
|
352
|
-
|
353
|
-
Set rr = r.Offset(1)
|
354
|
-
|
355
|
-
c = 1
|
356
|
-
|
357
|
-
End If
|
358
|
-
|
359
|
-
Next
|
360
|
-
|
361
|
-
End Sub
|
362
|
-
|
363
|
-
```
|
12
誤字
test
CHANGED
File without changes
|
test
CHANGED
@@ -330,11 +330,9 @@
|
|
330
330
|
|
331
331
|
.Name = rr(1)
|
332
332
|
|
333
|
-
.XValues = rr.Columns(3)
|
333
|
+
.XValues = rr.Columns(3)
|
334
|
-
|
334
|
+
|
335
|
-
.Values = rr.Columns(4)
|
335
|
+
.Values = rr.Columns(4)
|
336
|
-
|
337
|
-
|
338
336
|
|
339
337
|
If Left(rr(1).Value, 6) = "A01_1A" And Right(rr(1).Value, 4) = "000a" Then
|
340
338
|
|
11
修正
test
CHANGED
File without changes
|
test
CHANGED
@@ -244,6 +244,10 @@
|
|
244
244
|
|
245
245
|
|A01_1A_AAA_100a|A|20|20|
|
246
246
|
|
247
|
+
|
248
|
+
|
249
|
+
修正
|
250
|
+
|
247
251
|
```VBA
|
248
252
|
|
249
253
|
Sub SetSeriesParameters(series as Series, lineColor as Integer, _
|
10
修正
test
CHANGED
File without changes
|
test
CHANGED
@@ -314,6 +314,48 @@
|
|
314
314
|
|
315
315
|
'違ったら起点セルを基にグラフに系列追加
|
316
316
|
|
317
|
+
Set rr = rr.Resize(c, 3)
|
318
|
+
|
319
|
+
Dim series as Series
|
320
|
+
|
321
|
+
Set series cht.SeriesCollection.NewSeries
|
322
|
+
|
323
|
+
|
324
|
+
|
325
|
+
With series
|
326
|
+
|
327
|
+
.Name = rr(1)
|
328
|
+
|
329
|
+
.XValues = rr.Columns(3) 'leakage
|
330
|
+
|
331
|
+
.Values = rr.Columns(4) 'Speed
|
332
|
+
|
333
|
+
|
334
|
+
|
335
|
+
If Left(rr(1).Value, 6) = "A01_1A" And Right(rr(1).Value, 4) = "000a" Then
|
336
|
+
|
337
|
+
SetSeriesParameters series, vgRed, xlMarkerStyleTriangle, RGB(255, 0, 0), RGB(255, 0, 0), msoLineSolid
|
338
|
+
|
339
|
+
ElseIf Left(rr(1).Value, 6) = "A01_1A" And Right(rr(1).Value, 4) = "100a" Then
|
340
|
+
|
341
|
+
SetSeriesParameters series, vgRed, xlMarkerStyleTriangle, RGB(255, 0, 0), RGB(255, 0, 0), msoLineSolid, msoFalse
|
342
|
+
|
343
|
+
End If
|
344
|
+
|
345
|
+
End With
|
346
|
+
|
347
|
+
|
348
|
+
|
349
|
+
'起点セルとデータ数リセット
|
350
|
+
|
351
|
+
Set rr = r.Offset(1)
|
352
|
+
|
353
|
+
c = 1
|
354
|
+
|
355
|
+
End If
|
356
|
+
|
317
|
-
|
357
|
+
Next
|
358
|
+
|
359
|
+
End Sub
|
318
360
|
|
319
361
|
```
|
9
修正
test
CHANGED
File without changes
|
test
CHANGED
@@ -244,14 +244,76 @@
|
|
244
244
|
|
245
245
|
|A01_1A_AAA_100a|A|20|20|
|
246
246
|
|
247
|
+
```VBA
|
248
|
+
|
249
|
+
Sub SetSeriesParameters(series as Series, lineColor as Integer, _
|
250
|
+
|
251
|
+
markerStyle as XlMarkerStyle, fillColor as Integer, _
|
252
|
+
|
253
|
+
bgColor as Integer, lineStyle as MsoLineDashStyle, _
|
254
|
+
|
255
|
+
Optional fillVisible as MsoTriState = msoTrue)
|
256
|
+
|
257
|
+
With series
|
258
|
+
|
259
|
+
.Format.Line.ForeColor.RGB = lineColor
|
260
|
+
|
247
|
-
|
261
|
+
.Fill.Visible = fillVisible
|
262
|
+
|
248
|
-
|
263
|
+
End With
|
264
|
+
|
265
|
+
End Sub
|
266
|
+
|
249
|
-
|
267
|
+
Sub 散布図作成()
|
250
|
-
|
268
|
+
|
251
|
-
|
269
|
+
Dim cht As Chart
|
252
|
-
|
270
|
+
|
253
|
-
|
271
|
+
Dim rng As Range
|
272
|
+
|
254
|
-
|
273
|
+
Dim rr As Range
|
274
|
+
|
275
|
+
Dim r As Range
|
276
|
+
|
277
|
+
Dim c As Long
|
278
|
+
|
279
|
+
|
280
|
+
|
281
|
+
With ActiveSheet
|
282
|
+
|
283
|
+
'A列範囲をSet
|
284
|
+
|
285
|
+
Set rng = .Range("A2", .Range("A2").End(xlDown))
|
286
|
+
|
287
|
+
Set cht = .Shapes.AddChart(xlXYScatterSmooth).Chart
|
288
|
+
|
289
|
+
End With
|
290
|
+
|
291
|
+
|
292
|
+
|
255
|
-
|
293
|
+
'A列の起点セルを覚えておきます
|
294
|
+
|
256
|
-
|
295
|
+
Set rr = rng(1)
|
296
|
+
|
297
|
+
'セル名ごとのデータ数count用
|
298
|
+
|
299
|
+
c = 1
|
300
|
+
|
301
|
+
|
302
|
+
|
303
|
+
'A列範囲をLoopします
|
304
|
+
|
305
|
+
For Each r In rng
|
306
|
+
|
307
|
+
If r.Value = r.Offset(1).Value Then
|
308
|
+
|
257
|
-
|
309
|
+
'1行下のセル名が同じならCountUp
|
310
|
+
|
311
|
+
c = c + 1
|
312
|
+
|
313
|
+
Else
|
314
|
+
|
315
|
+
'違ったら起点セルを基にグラフに系列追加
|
316
|
+
|
317
|
+
コード
|
318
|
+
|
319
|
+
```
|
8
修正
test
CHANGED
File without changes
|
test
CHANGED
@@ -78,9 +78,9 @@
|
|
78
78
|
|
79
79
|
.Name = rr(1)
|
80
80
|
|
81
|
-
.XValues = rr.Columns(3)
|
81
|
+
.XValues = rr.Columns(3)
|
82
|
-
|
82
|
+
|
83
|
-
.Values = rr.Columns(4)
|
83
|
+
.Values = rr.Columns(4)
|
84
84
|
|
85
85
|
|
86
86
|
|
7
修正
test
CHANGED
File without changes
|
test
CHANGED
@@ -90,11 +90,11 @@
|
|
90
90
|
|
91
91
|
.MarkerStyle = xlMarkerStyleTriangle '▲
|
92
92
|
|
93
|
-
.Format.Fill.ForeColor.RGB = RGB(255, 0, 0)
|
93
|
+
.Format.Fill.ForeColor.RGB = RGB(255, 0, 0)
|
94
|
-
|
94
|
+
|
95
|
-
.MarkerBackgroundColor = RGB(255, 0, 0)
|
95
|
+
.MarkerBackgroundColor = RGB(255, 0, 0)
|
96
|
-
|
96
|
+
|
97
|
-
.Format.Line.DashStyle = msoLineSolid
|
97
|
+
.Format.Line.DashStyle = msoLineSolid
|
98
98
|
|
99
99
|
|
100
100
|
|
@@ -106,11 +106,11 @@
|
|
106
106
|
|
107
107
|
.MarkerStyle = xlMarkerStyleTriangle '△
|
108
108
|
|
109
|
-
.Format.Fill.ForeColor.RGB = RGB(255, 0, 0)
|
109
|
+
.Format.Fill.ForeColor.RGB = RGB(255, 0, 0)
|
110
|
-
|
110
|
+
|
111
|
-
.MarkerBackgroundColor = RGB(255, 0, 0)
|
111
|
+
.MarkerBackgroundColor = RGB(255, 0, 0)
|
112
|
-
|
112
|
+
|
113
|
-
.Format.Line.DashStyle = msoLineSolid
|
113
|
+
.Format.Line.DashStyle = msoLineSolid
|
114
114
|
|
115
115
|
.Fill.Visible = msoFalse
|
116
116
|
|
@@ -124,11 +124,11 @@
|
|
124
124
|
|
125
125
|
.MarkerStyle = xlMarkerStyleTriangle '▲
|
126
126
|
|
127
|
-
.Format.Fill.ForeColor.RGB = RGB(255, 0, 0)
|
127
|
+
.Format.Fill.ForeColor.RGB = RGB(255, 0, 0)
|
128
|
-
|
128
|
+
|
129
|
-
.MarkerBackgroundColor = RGB(255, 0, 0)
|
129
|
+
.MarkerBackgroundColor = RGB(255, 0, 0)
|
130
|
-
|
130
|
+
|
131
|
-
.Format.Line.DashStyle = msoLineDash
|
131
|
+
.Format.Line.DashStyle = msoLineDash
|
132
132
|
|
133
133
|
|
134
134
|
|
@@ -140,11 +140,11 @@
|
|
140
140
|
|
141
141
|
.MarkerStyle = xlMarkerStyleTriangle '△
|
142
142
|
|
143
|
-
.Format.Fill.ForeColor.RGB = RGB(255, 0, 0)
|
143
|
+
.Format.Fill.ForeColor.RGB = RGB(255, 0, 0)
|
144
|
-
|
144
|
+
|
145
|
-
.MarkerBackgroundColor = RGB(255, 0, 0)
|
145
|
+
.MarkerBackgroundColor = RGB(255, 0, 0)
|
146
|
-
|
146
|
+
|
147
|
-
.Format.Line.DashStyle = msoLineDash
|
147
|
+
.Format.Line.DashStyle = msoLineDash
|
148
148
|
|
149
149
|
.Fill.Visible = msoFalse
|
150
150
|
|
@@ -154,13 +154,13 @@
|
|
154
154
|
|
155
155
|
ElseIf Left(rr(1).Value, 7) = "A01A_1A" And Right(rr(1).Value, 4) = "000a" Then
|
156
156
|
|
157
|
-
.Format.Line.ForeColor.RGB = vbBlack
|
157
|
+
.Format.Line.ForeColor.RGB = vbBlack
|
158
158
|
|
159
159
|
.MarkerBackgroundColor = RGB(0, 0, 0)
|
160
160
|
|
161
161
|
.MarkerStyle = xlMarkerStyleSquare '■
|
162
162
|
|
163
|
-
.Format.Line.DashStyle = msoLineSolid
|
163
|
+
.Format.Line.DashStyle = msoLineSolid
|
164
164
|
|
165
165
|
|
166
166
|
|
@@ -168,13 +168,13 @@
|
|
168
168
|
|
169
169
|
ElseIf Left(rr(1).Value, 7) = "A01A_1A" And Right(rr(1).Value, 4) = "100a" Then
|
170
170
|
|
171
|
-
.Format.Line.ForeColor.RGB = vbBlack
|
171
|
+
.Format.Line.ForeColor.RGB = vbBlack
|
172
172
|
|
173
173
|
.MarkerBackgroundColor = RGB(0, 0, 0)
|
174
174
|
|
175
175
|
.MarkerStyle = xlMarkerStyleSquare '□
|
176
176
|
|
177
|
-
.Format.Line.DashStyle = msoLineSolid
|
177
|
+
.Format.Line.DashStyle = msoLineSolid
|
178
178
|
|
179
179
|
.Fill.Visible = msoFalse
|
180
180
|
|
@@ -190,11 +190,11 @@
|
|
190
190
|
|
191
191
|
.MarkerStyle = xlMarkerStyleTriangle '▲
|
192
192
|
|
193
|
-
.Format.Fill.ForeColor.RGB = RGB(0, 128, 0)
|
193
|
+
.Format.Fill.ForeColor.RGB = RGB(0, 128, 0)
|
194
194
|
|
195
195
|
.MarkerBackgroundColor = RGB(0, 128, 0)
|
196
196
|
|
197
|
-
.Format.Line.DashStyle = msoLineSolid
|
197
|
+
.Format.Line.DashStyle = msoLineSolid
|
198
198
|
|
199
199
|
|
200
200
|
|
@@ -206,11 +206,11 @@
|
|
206
206
|
|
207
207
|
.MarkerStyle = xlMarkerStyleTriangle '△
|
208
208
|
|
209
|
-
.Format.Fill.ForeColor.RGB = RGB(0, 128, 0)
|
209
|
+
.Format.Fill.ForeColor.RGB = RGB(0, 128, 0)
|
210
210
|
|
211
211
|
.MarkerBackgroundColor = RGB(0, 128, 0)
|
212
212
|
|
213
|
-
.Format.Line.DashStyle = msoLineSolid
|
213
|
+
.Format.Line.DashStyle = msoLineSolid
|
214
214
|
|
215
215
|
.Fill.Visible = msoFalse
|
216
216
|
|
6
誤記
test
CHANGED
File without changes
|
test
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
VBAで系列名ごとに散布図を作成し、グラフを見やすくするためにあらかじめ
|
1
|
+
VBAで系列名ごとに散布図を作成し、グラフを見やすくするためにあらかじめ線種とマーカを設定しようとしています。
|
2
2
|
|
3
3
|
系列名は AAA_BB_CCC_DDDとして
|
4
4
|
|
5
誤記
test
CHANGED
File without changes
|
test
CHANGED
@@ -8,13 +8,15 @@
|
|
8
8
|
|
9
9
|
|
10
10
|
|
11
|
+
下記でもグラフが作成できますが、本来ですと、もっと他の方法で書くのでしょうが、私には線種とマーカを設定について下記の方法しかコードの書き方が分かりません。
|
12
|
+
|
13
|
+
|
14
|
+
|
11
|
-
|
15
|
+
AAAだけでも20通りあり、AAA_BBとすると6文字から12文字になります。(下記コードは一部分)
|
12
|
-
|
13
|
-
|
14
|
-
|
16
|
+
|
15
|
-
|
17
|
+
すみませんが、今後もグラフ系列が増えてもいいような方法で、線種とマーカー部分についてコードを書きたいのですが、このコードでアドバイスを頂きたくよろしくお願いいたします。
|
16
|
-
|
18
|
+
|
17
|
-
少しでもコードを短くするためにAAA_BBが同じならDDDの部分で1本目はマーカーを塗りつぶし、2本目は、塗りつぶしなしにすればいいかと考えています。
|
19
|
+
また、少しでもコードの書き方を間違えなく、短くするためにAAA_BBが同じならDDDの部分で1本目はマーカーを塗りつぶし、2本目は、塗りつぶしなしにすればいいかと考えています。
|
18
20
|
|
19
21
|
|
20
22
|
|
4
誤記
test
CHANGED
File without changes
|
test
CHANGED
@@ -12,7 +12,7 @@
|
|
12
12
|
|
13
13
|
|
14
14
|
|
15
|
-
本来ですと、もっと他の方法書くのでしょうが、私には線種とマーカを設定について下記の方法しかコードの書き方が分かりません。すみませんが、種とマーカを設定
|
15
|
+
本来ですと、もっと他の方法で書くのでしょうが、私には線種とマーカを設定について下記の方法しかコードの書き方が分かりません。すみませんが、種とマーカを設定でアドバイスを頂きたくよろしくお願いいたします。
|
16
16
|
|
17
17
|
少しでもコードを短くするためにAAA_BBが同じならDDDの部分で1本目はマーカーを塗りつぶし、2本目は、塗りつぶしなしにすればいいかと考えています。
|
18
18
|
|
3
修正
test
CHANGED
File without changes
|
test
CHANGED
@@ -88,11 +88,11 @@
|
|
88
88
|
|
89
89
|
.MarkerStyle = xlMarkerStyleTriangle '▲
|
90
90
|
|
91
|
-
.Format.Fill.ForeColor.RGB = RGB(255, 0, 0)
|
91
|
+
.Format.Fill.ForeColor.RGB = RGB(255, 0, 0) ' マーカー色
|
92
|
-
|
92
|
+
|
93
|
-
.MarkerBackgroundColor = RGB(255, 0, 0)
|
93
|
+
.MarkerBackgroundColor = RGB(255, 0, 0)
|
94
|
-
|
94
|
+
|
95
|
-
.Format.Line.DashStyle = msoLineSolid
|
95
|
+
.Format.Line.DashStyle = msoLineSolid '直線
|
96
96
|
|
97
97
|
|
98
98
|
|
@@ -104,11 +104,11 @@
|
|
104
104
|
|
105
105
|
.MarkerStyle = xlMarkerStyleTriangle '△
|
106
106
|
|
107
|
-
.Format.Fill.ForeColor.RGB = RGB(255, 0, 0)
|
107
|
+
.Format.Fill.ForeColor.RGB = RGB(255, 0, 0) ' マーカー色
|
108
|
-
|
108
|
+
|
109
|
-
.MarkerBackgroundColor = RGB(255, 0, 0)
|
109
|
+
.MarkerBackgroundColor = RGB(255, 0, 0)
|
110
|
-
|
110
|
+
|
111
|
-
.Format.Line.DashStyle = msoLineSolid
|
111
|
+
.Format.Line.DashStyle = msoLineSolid '直線
|
112
112
|
|
113
113
|
.Fill.Visible = msoFalse
|
114
114
|
|
@@ -122,11 +122,11 @@
|
|
122
122
|
|
123
123
|
.MarkerStyle = xlMarkerStyleTriangle '▲
|
124
124
|
|
125
|
-
.Format.Fill.ForeColor.RGB = RGB(255, 0, 0)
|
125
|
+
.Format.Fill.ForeColor.RGB = RGB(255, 0, 0) ' マーカー色
|
126
|
-
|
126
|
+
|
127
|
-
.MarkerBackgroundColor = RGB(255, 0, 0)
|
127
|
+
.MarkerBackgroundColor = RGB(255, 0, 0)
|
128
|
-
|
128
|
+
|
129
|
-
.Format.Line.DashStyle = msoLineDash
|
129
|
+
.Format.Line.DashStyle = msoLineDash '破線
|
130
130
|
|
131
131
|
|
132
132
|
|
@@ -138,11 +138,11 @@
|
|
138
138
|
|
139
139
|
.MarkerStyle = xlMarkerStyleTriangle '△
|
140
140
|
|
141
|
-
.Format.Fill.ForeColor.RGB = RGB(255, 0, 0)
|
141
|
+
.Format.Fill.ForeColor.RGB = RGB(255, 0, 0) ' マーカー色
|
142
|
-
|
142
|
+
|
143
|
-
.MarkerBackgroundColor = RGB(255, 0, 0)
|
143
|
+
.MarkerBackgroundColor = RGB(255, 0, 0)
|
144
|
-
|
144
|
+
|
145
|
-
.Format.Line.DashStyle = msoLineDash
|
145
|
+
.Format.Line.DashStyle = msoLineDash '破線
|
146
146
|
|
147
147
|
.Fill.Visible = msoFalse
|
148
148
|
|
@@ -150,32 +150,68 @@
|
|
150
150
|
|
151
151
|
|
152
152
|
|
153
|
-
ElseIf Left(rr(1).Value,
|
153
|
+
ElseIf Left(rr(1).Value, 7) = "A01A_1A" And Right(rr(1).Value, 4) = "000a" Then
|
154
|
-
|
154
|
+
|
155
|
-
.Format.Line.ForeColor.RGB = vbBlack
|
155
|
+
.Format.Line.ForeColor.RGB = vbBlack '黒
|
156
156
|
|
157
157
|
.MarkerBackgroundColor = RGB(0, 0, 0)
|
158
158
|
|
159
159
|
.MarkerStyle = xlMarkerStyleSquare '■
|
160
160
|
|
161
|
-
.Format.Line.DashStyle = msoLineSolid
|
161
|
+
.Format.Line.DashStyle = msoLineSolid '直線
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
162
|
+
|
163
|
+
|
164
|
+
|
165
|
+
|
166
|
+
|
167
|
-
ElseIf Left(rr(1).Value,
|
167
|
+
ElseIf Left(rr(1).Value, 7) = "A01A_1A" And Right(rr(1).Value, 4) = "100a" Then
|
168
|
-
|
168
|
+
|
169
|
-
.Format.Line.ForeColor.RGB = vbBlack
|
169
|
+
.Format.Line.ForeColor.RGB = vbBlack '黒
|
170
170
|
|
171
171
|
.MarkerBackgroundColor = RGB(0, 0, 0)
|
172
172
|
|
173
173
|
.MarkerStyle = xlMarkerStyleSquare '□
|
174
174
|
|
175
|
-
.Format.Line.DashStyle = msoLineSolid
|
175
|
+
.Format.Line.DashStyle = msoLineSolid '直線
|
176
176
|
|
177
177
|
.Fill.Visible = msoFalse
|
178
178
|
|
179
|
+
|
180
|
+
|
181
|
+
End If
|
182
|
+
|
183
|
+
|
184
|
+
|
185
|
+
If Left(rr(1).Value, 6) = "A02_1A" And Right(rr(1).Value, 4) = "1000" Then
|
186
|
+
|
187
|
+
.Format.Line.ForeColor.RGB = vbGreen
|
188
|
+
|
189
|
+
.MarkerStyle = xlMarkerStyleTriangle '▲
|
190
|
+
|
191
|
+
.Format.Fill.ForeColor.RGB = RGB(0, 128, 0) ' マーカー色
|
192
|
+
|
193
|
+
.MarkerBackgroundColor = RGB(0, 128, 0)
|
194
|
+
|
195
|
+
.Format.Line.DashStyle = msoLineSolid '直線
|
196
|
+
|
197
|
+
|
198
|
+
|
199
|
+
|
200
|
+
|
201
|
+
ElseIf Left(rr(1).Value, 6) = "A02_1A" And Right(rr(1).Value, 4) = "2000" Then
|
202
|
+
|
203
|
+
.Format.Line.ForeColor.RGB = vbGreen
|
204
|
+
|
205
|
+
.MarkerStyle = xlMarkerStyleTriangle '△
|
206
|
+
|
207
|
+
.Format.Fill.ForeColor.RGB = RGB(0, 128, 0) ' マーカー色
|
208
|
+
|
209
|
+
.MarkerBackgroundColor = RGB(0, 128, 0)
|
210
|
+
|
211
|
+
.Format.Line.DashStyle = msoLineSolid '直線
|
212
|
+
|
213
|
+
.Fill.Visible = msoFalse
|
214
|
+
|
179
215
|
|
180
216
|
|
181
217
|
End If
|
2
修正
test
CHANGED
File without changes
|
test
CHANGED
@@ -197,3 +197,23 @@
|
|
197
197
|
End Sub
|
198
198
|
|
199
199
|
```
|
200
|
+
|
201
|
+
|
202
|
+
|
203
|
+
|系列名 | |X|Y|
|
204
|
+
|
205
|
+
|A01_1A_AAA_000a|A|10|10|
|
206
|
+
|
207
|
+
|A01_1A_AAA_100a|A|20|20|
|
208
|
+
|
209
|
+
|A01_2.5B_CCC_000a|A|30|30|
|
210
|
+
|
211
|
+
|A01_2.5B_CCC_100a|A|40|40|
|
212
|
+
|
213
|
+
|A01A_1A_AAA_000a|B|30|20|
|
214
|
+
|
215
|
+
|A01A_1A_AAA_100a|B|40|30|
|
216
|
+
|
217
|
+
|A02_1A_AAA_1000|B|70|70|
|
218
|
+
|
219
|
+
|A02_1A_AAA_2000|C|80|90|
|
1
誤記
test
CHANGED
File without changes
|
test
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
VBAで系列名ごとに散布図を作成し、グラフを見やすくするためにあらかじめ
|
1
|
+
VBAで系列名ごとに散布図を作成し、グラフを見やすくするためにあらかじめあ種とマーカを設定しようとしています。
|
2
2
|
|
3
3
|
系列名は AAA_BB_CCC_DDDとして
|
4
4
|
|
@@ -8,9 +8,13 @@
|
|
8
8
|
|
9
9
|
|
10
10
|
|
11
|
-
|
11
|
+
下記でもグラフが作成できますが、ただ、AAAだけでも20通りあり、AAA_BBとすると6文字から12文字になります。
|
12
12
|
|
13
|
+
|
14
|
+
|
15
|
+
本来ですと、もっと他の方法書くのでしょうが、私には線種とマーカを設定について下記の方法しかコードの書き方が分かりません。すみませんが、種とマーカを設定にアドバイスを頂きたくよろしくお願いいたします。
|
16
|
+
|
13
|
-
少しでもコードを短くするためにDDDの部分で1本目は
|
17
|
+
少しでもコードを短くするためにAAA_BBが同じならDDDの部分で1本目はマーカーを塗りつぶし、2本目は、塗りつぶしなしにすればいいかと考えています。
|
14
18
|
|
15
19
|
|
16
20
|
|
@@ -78,7 +82,7 @@
|
|
78
82
|
|
79
83
|
|
80
84
|
|
81
|
-
If Left(rr(1).Value, 6) = "
|
85
|
+
If Left(rr(1).Value, 6) = "A01_1A" And Right(rr(1).Value, 4) = "000a" Then
|
82
86
|
|
83
87
|
.Format.Line.ForeColor.RGB = vbRed
|
84
88
|
|
@@ -94,7 +98,7 @@
|
|
94
98
|
|
95
99
|
|
96
100
|
|
97
|
-
ElseIf Left(rr(1).Value, 6) = "
|
101
|
+
ElseIf Left(rr(1).Value, 6) = "A01_1A" And Right(rr(1).Value, 4) = "100a" Then
|
98
102
|
|
99
103
|
.Format.Line.ForeColor.RGB = vbRed
|
100
104
|
|
@@ -112,7 +116,7 @@
|
|
112
116
|
|
113
117
|
|
114
118
|
|
115
|
-
ElseIf Left(rr(1).Value, 8) = "
|
119
|
+
ElseIf Left(rr(1).Value, 8) = "A01_2.5B" And Right(rr(1).Value, 4) = "000a" Then
|
116
120
|
|
117
121
|
.Format.Line.ForeColor.RGB = vbRed
|
118
122
|
|
@@ -128,7 +132,7 @@
|
|
128
132
|
|
129
133
|
|
130
134
|
|
131
|
-
ElseIf Left(rr(1).Value, 8) = "
|
135
|
+
ElseIf Left(rr(1).Value, 8) = "A01_2.5B" And Right(rr(1).Value, 4) = "100a" Then
|
132
136
|
|
133
137
|
.Format.Line.ForeColor.RGB = vbRed
|
134
138
|
|
@@ -146,7 +150,7 @@
|
|
146
150
|
|
147
151
|
|
148
152
|
|
149
|
-
ElseIf Left(rr(1).Value, 6) = "
|
153
|
+
ElseIf Left(rr(1).Value, 6) = "A02_1A" And Right(rr(1).Value, 4) = "1000" Then
|
150
154
|
|
151
155
|
.Format.Line.ForeColor.RGB = vbBlack
|
152
156
|
|
@@ -160,7 +164,7 @@
|
|
160
164
|
|
161
165
|
|
162
166
|
|
163
|
-
ElseIf Left(rr(1).Value, 6) = "
|
167
|
+
ElseIf Left(rr(1).Value, 6) = "A02_1A" And Right(rr(1).Value, 4) = "2000" Then
|
164
168
|
|
165
169
|
.Format.Line.ForeColor.RGB = vbBlack
|
166
170
|
|