回答編集履歴
1
上書きと新規混在した場合、行が跳ぶので新規登録は毎回最終行を見に行くよう修正
test
CHANGED
@@ -64,19 +64,19 @@
|
|
64
64
|
|
65
65
|
'無ければ新規
|
66
66
|
|
67
|
-
With ws.Cells(
|
67
|
+
With ws.Cells(ws.Rows.Count, 3).End(xlUp)
|
68
68
|
|
69
|
-
.Offset(, 0).Value = DateAdd("d", i, Date1)
|
69
|
+
.Offset(1, 0).Value = DateAdd("d", i, Date1)
|
70
70
|
|
71
|
-
.Offset(, 1).Value = txt社員番号.Text
|
71
|
+
.Offset(1, 1).Value = txt社員番号.Text '例)1234
|
72
72
|
|
73
|
-
.Offset(, 2).FormulaR1C1 = "=RC[-2]&RC[-1]"
|
73
|
+
.Offset(1, 2).FormulaR1C1 = "=RC[-2]&RC[-1]"
|
74
74
|
|
75
|
-
.Offset(, 3).Value = "新規"
|
75
|
+
.Offset(1, 3).Value = "新規"
|
76
76
|
|
77
|
-
.Offset(, 4).Value = "登録"
|
77
|
+
.Offset(1, 4).Value = "登録"
|
78
78
|
|
79
|
-
.Offset(, 5).Value = "しました"
|
79
|
+
.Offset(1, 5).Value = "しました"
|
80
80
|
|
81
81
|
End With
|
82
82
|
|