Option Explicit
Sub 転記1()
Dim i As Long
Dim zzz As String
Dim dtToday As Date
dtToday = Date + 20
i = 2
Do Until Sheets("データ").Cells(i, "A").Value = ""
With Sheets("ひな形(csv用)")
.Cells(i, "a").Value = "0"
.Cells(i, "e").Value = dtToday
.Cells(i, "j").Value = "N"
.Cells(i, "k").Value = "Y"
.Cells(i, "l").Value = "55555"
.Cells(i, "b").Value = Sheets("データ").Cells(i, "a").Value
.Cells(i, "c").Value = Sheets("データ").Cells(i, "b").Value
.Cells(i, "d").Value = Sheets("データ").Cells(i, "c").Value
zzz = Sheets("データ").Cells(i, "e")
Select Case True
Case zzz Like "123"
.Cells(i, "g").Value = "123456"
Case zzz Like "456"
.Cells(i, "g").Value = "456789"
Case Else
.Cells(i, "g").Value = Sheets("データ").Cells(i, "e").Value
End Select
End With
i = i + 1
Loop
End Sub