Private Sub CommandButton1_Click() For i = 10 To 13 If Cells(204, i) <> "-" Then Ar = Split(Cells(204, i), "-") Sheet2.Cells(204, Val(Ar(0)) + 3) = Cells(2, Val(Ar(0)) + 3) Sheet2.Cells(204, Val(Ar(1)) + 3) = Cells(2, Val(Ar(1)) + 3) Sheet2.Cells(204, Val(Ar(2)) + 3) = Cells(2, Val(Ar(2)) + 3) End If Next i End Sub
Private Sub CommandButton1_Click() For i = 10 To 13 If Cells(204, i) <> "-" Then Ar = Split(Cells(204, i), "-") Sheet2.Cells(204, Val(Ar(0)) + 3) = Cells(2, Val(Ar(0)) + 3) Sheet2.Cells(204, Val(Ar(1)) + 3) = Cells(2, Val(Ar(1)) + 3) Sheet2.Cells(204, Val(Ar(2)) + 3) = Cells(2, Val(Ar(2)) + 3) End If Next i End Sub