会社名・年度一致で挿入。
Sub Macro1()
'
' Macro1 Macro
'
For i = 3 To 15000
Cells(1, 15) = i
a = Cells(i, 1) & Left(Cells(i, 3), 4)
If a = "" Then
i = 15000
Else
For j = 3 To 20000
If Cells(j, 18) = "" Then
j = 20000
Else
If a = Cells(j, 18) & Cells(j, 20) Then
Cells(i, 13) = Cells(j, 23)
Cells(i, 14) = Cells(j, 24)
Cells(i, 15) = Cells(j, 25)
j = 20000
End If
End If
Next j
End If
Next i