For X1 = 2 To X
For Y1 = 1 To 12
MO(X1, Y1) = Cells(X1, Y1)
Next
Next
Cells(1, 15) = "希望交期"
For X1 = 2 To X - 1
If MO(X1, 12) > 0 Then
Cells(X1, 15) = ""
Else
For X2 = 2 To X - 1
Do While MO(X1, 12) + MO(X2, 10) < 0
If MO(X2, 4) = "進貨" Then
Cells(X1, 15) = MO(X2, 3) & ">>" & MO(X2, 6) & Chr(10)
End If
X2 = X2 + 1
Loop
Exit For