1 2 3 4 5 6 7 8 9 10 11
| If Cells(10, 13) <> "" Then
If Mid(Cells(10, 13).Value, 2, 3) > 9 And Mid(Cells(10, 13).Value, 2, 3) < 99 Then
Cells(10, 13) = "M0" & Mid(Cells(10, 13).Value, 2, 3) + 1 & "08"
ElseIf Mid(Cells(10, 13).Value, 2, 3) = 9 Then
Cells(10, 13) = "M01008"
ElseIf Mid(Cells(10, 13).Value, 2, 3) = 99 Then Cells(10, 13) = "M10008"
ElseIf Mid(Cells(10, 13).Value, 2, 3) < 9 Then Cells(10, 13) = "M00" & Mid(Cells(10, 13).Value, 2, 3) + 1 & "08"
Else
Cells(10, 13) = "M" & Mid(Cells(10, 13).Value, 2, 3) + 1 & "08"
End If
End If |
Partager