Bonsoir le forum,
Comment simplifier se code :
Do Until ActiveCell.Offset = ""
If ActiveCell(0, -1) = "0" Or "12" Then
ActiveCell.FormulaR1C1 = "500"
Else
If ActiveCell(0, -1) = "1" Or "10" Then
ActiveCell.FormulaR1C1 = "20"
Else
If ActiveCell(0, -1) = "2" Or "9" Then
ActiveCell.FormulaR1C1 = "10"
Else
If ActiveCell(0, -1) = "3" Or "8" Then
ActiveCell.FormulaR1C1 = "5"
Else
If ActiveCell(0, -1) = "11" Then
ActiveCell.FormulaR1C1 = "50"
Else
If ActiveCell(0, -1) = "13" Then
ActiveCell.FormulaR1C1 = "10000"
Else
If ActiveCell(0, -1) = "15" Or "16" Or "17" Or "18" Or "19" Or "20" Then
ActiveCell.FormulaR1C1 = "1000000"
End If
End If
End If
End If
End If
End If
End If
End If
Loop
Merci
Comment simplifier se code :
Do Until ActiveCell.Offset = ""
If ActiveCell(0, -1) = "0" Or "12" Then
ActiveCell.FormulaR1C1 = "500"
Else
If ActiveCell(0, -1) = "1" Or "10" Then
ActiveCell.FormulaR1C1 = "20"
Else
If ActiveCell(0, -1) = "2" Or "9" Then
ActiveCell.FormulaR1C1 = "10"
Else
If ActiveCell(0, -1) = "3" Or "8" Then
ActiveCell.FormulaR1C1 = "5"
Else
If ActiveCell(0, -1) = "11" Then
ActiveCell.FormulaR1C1 = "50"
Else
If ActiveCell(0, -1) = "13" Then
ActiveCell.FormulaR1C1 = "10000"
Else
If ActiveCell(0, -1) = "15" Or "16" Or "17" Or "18" Or "19" Or "20" Then
ActiveCell.FormulaR1C1 = "1000000"
End If
End If
End If
End If
End If
End If
End If
End If
Loop
Merci