質問編集履歴

3

コード修正

2019/09/21 07:24

投稿

Chif
Chif

スコア5

test CHANGED
File without changes
test CHANGED
@@ -92,7 +92,7 @@
92
92
 
93
93
  Do
94
94
 
95
- Result = Split(Range("A1"), ",") '[1,2,3,]
95
+ Result = Split(Range("1" & 1 ), ",") '[1,2,3,]
96
96
 
97
97
 
98
98
 
@@ -104,15 +104,15 @@
104
104
 
105
105
  If Result(i) = "" Then
106
106
 
107
- Range("E" & 4 + i) = Range("B" & 4 + i)
107
+ Range("列5" & 3 + i) = Range("列3" & 3 + i)
108
108
 
109
109
 
110
110
 
111
- ElseIf Result(i) > LBound(Result) Then
111
+ ElseIf Result(i) = LBound(Result) Then
112
112
 
113
113
 
114
114
 
115
- Range("E" & 4 + i) = Range("A" & 4 + i)
115
+ Range("列5" & 3 + i) = Range("列2" & 3 + i)
116
116
 
117
117
 
118
118
 

2

コードずれ修正

2019/09/21 07:24

投稿

Chif
Chif

スコア5

test CHANGED
File without changes
test CHANGED
@@ -84,59 +84,47 @@
84
84
 
85
85
  ```
86
86
 
87
- Dim Result As Variant
87
+ Dim Result As Variant
88
88
 
89
- Dim i As Long
89
+ Dim i As Long
90
-
91
-
92
-
93
- Do
94
-
95
- Result = Split(Range("A1"), ",") '[1,2,3,]
96
-
97
-
98
-
99
- i = 0
100
-
101
- For i = LBound(Result) To UBound(Result)
102
-
103
-
104
-
105
-
106
-
107
-
108
-
109
- If Result(i) = "" Then
110
-
111
-
112
-
113
- Range("E" & 4 + i) = Range("B" & 4 + i)
114
90
 
115
91
 
116
92
 
117
- ElseIf Result(i) > LBound(Result) Then
93
+ Do
118
94
 
119
-
120
-
121
- Range("E" & 4 + i) = Range("A" & 4 + i)
95
+ Result = Split(Range("A1"), ",") '[1,2,3,]
122
-
123
- End If
124
96
 
125
97
 
126
98
 
127
- Next i
99
+ i = 0
100
+
101
+ For i = LBound(Result) To UBound(Result)
128
102
 
129
103
 
130
104
 
131
- Exit Do
105
+ If Result(i) = "" Then
132
106
 
133
- Loop
107
+ Range("E" & 4 + i) = Range("B" & 4 + i)
134
108
 
135
109
 
136
110
 
137
-
111
+ ElseIf Result(i) > LBound(Result) Then
138
112
 
113
+
114
+
139
-
115
+ Range("E" & 4 + i) = Range("A" & 4 + i)
116
+
117
+
118
+
119
+ End If
120
+
121
+ Next i
122
+
123
+ Exit Do
124
+
125
+ Loop
126
+
127
+
140
128
 
141
129
  End Sub
142
130
 

1

Excelタグを追加致しました。。

2019/09/21 06:35

投稿

Chif
Chif

スコア5

test CHANGED
File without changes
test CHANGED
File without changes