質問編集履歴
2
neconekocat様、大変失礼いたしました。仰る通り、g=g+1が抜けておりました。再確認致しましたので、もう一度見ていただけますでしょうか。
test
CHANGED
File without changes
|
test
CHANGED
@@ -82,6 +82,8 @@
|
|
82
82
|
|
83
83
|
End With
|
84
84
|
|
85
|
+
g = g + 1
|
86
|
+
|
85
87
|
Next i
|
86
88
|
|
87
89
|
|
1
せっかくご確認いただいたにも関わらず提示コードを誤っており申し訳ありません。正しくはブックB Inputシートのデータを、ブックA Sheet1に転記するコードです。再度ご確認いただけますでしょうか。
test
CHANGED
File without changes
|
test
CHANGED
@@ -46,39 +46,39 @@
|
|
46
46
|
|
47
47
|
With Workbooks("B.xlsx").Worksheets("Input")
|
48
48
|
|
49
|
-
Workbooks("
|
49
|
+
Workbooks("A.xlsm").Worksheets("Sheet1").Range("A" & g) = .Range("A" & i)
|
50
50
|
|
51
|
-
Workbooks("
|
51
|
+
Workbooks("A.xlsm").Worksheets("Sheet1").Range("b" & g) = .Range("B" & i)
|
52
52
|
|
53
|
-
Workbooks("
|
53
|
+
Workbooks("A.xlsm").Worksheets("Sheet1").Range("c" & g) = .Range("C" & i)
|
54
54
|
|
55
|
-
Workbooks("
|
55
|
+
Workbooks("A.xlsm").Worksheets("Sheet1").Range("d" & g) = .Range("D" & i)
|
56
56
|
|
57
|
-
Workbooks("
|
57
|
+
Workbooks("A.xlsm").Worksheets("Sheet1").Range("e" & g) = .Range("E" & i)
|
58
58
|
|
59
|
-
Workbooks("
|
59
|
+
Workbooks("A.xlsm").Worksheets("Sheet1").Range("f" & g) = .Range("F" & i)
|
60
60
|
|
61
|
-
Workbooks("
|
61
|
+
Workbooks("A.xlsm").Worksheets("Sheet1").Range("g" & g) = .Range("G" & i)
|
62
62
|
|
63
|
-
Workbooks("
|
63
|
+
Workbooks("A.xlsm").Worksheets("Sheet1").Range("h" & g) = .Range("H" & i)
|
64
64
|
|
65
|
-
Workbooks("
|
65
|
+
Workbooks("A.xlsm").Worksheets("Sheet1").Range("i" & g) = .Range("I" & i)
|
66
66
|
|
67
|
-
Workbooks("
|
67
|
+
Workbooks("A.xlsm").Worksheets("Sheet1").Range("j" & g) = .Range("J" & i)
|
68
68
|
|
69
|
-
Workbooks("
|
69
|
+
Workbooks("A.xlsm").Worksheets("Sheet1").Range("k" & g) = .Range("K" & i)
|
70
70
|
|
71
|
-
Workbooks("
|
71
|
+
Workbooks("A.xlsm").Worksheets("Sheet1").Range("l" & g) = .Range("L" & i)
|
72
72
|
|
73
|
-
Workbooks("
|
73
|
+
Workbooks("A.xlsm").Worksheets("Sheet1").Range("m" & g) = .Range("M" & i)
|
74
74
|
|
75
|
-
Workbooks("
|
75
|
+
Workbooks("A.xlsm").Worksheets("Sheet1").Range("n" & g) = .Range("N" & i)
|
76
76
|
|
77
|
-
Workbooks("
|
77
|
+
Workbooks("A.xlsm").Worksheets("Sheet1").Range("o" & g) = .Range(**"C1"**)
|
78
78
|
|
79
|
-
Workbooks("
|
79
|
+
Workbooks("A.xlsm").Worksheets("Sheet1").Range("p" & g) = .Range(**"C2"**)
|
80
80
|
|
81
|
-
Workbooks("
|
81
|
+
Workbooks("A.xlsm").Worksheets("Sheet1").Range("q" & g) = .Range(**"J2"**)
|
82
82
|
|
83
83
|
End With
|
84
84
|
|