R
Reeaz
Guest
Bonjour,
j'ai une feuille de calcul, sur la collonne F j'ai des notes pr chaque note j'aimerai asscosier une valeur 4 collonnes plus loin, j'ai crée une macro mais ca ne marche pas, la voila:
Sub Chiffre1()
fin = Range("F2").End(xlDown).Row
For i = 2 To fin
If Cells(i, 7).Value = "Etat" Then Cells(i, 11).Value = 1
If Cells(i, 7).Value = "NR" Then Cells(i, 11).Value = 23
If Cells(i, 7).Value = "AAA" Then Cells(i, 11).Value = 2
If Cells(i, 7).Value = "AA+" Then Cells(i, 11).Value = 3
If Cells(i, 7).Value = "AA" Then Cells(i, 11).Value = 4
If Cells(i, 7).Value = "AA-" Then Cells(i, 11).Value = 5
If Cells(i, 7).Value = "A+" Then Cells(i, 11).Value = 6
If Cells(i, 7).Value = "A" Then Cells(i, 11).Value = 7
If Cells(i, 7).Value = "A-" Then Cells(i, 11).Value = 8
If Cells(i, 7).Value = "BBB+" Then Cells(i, 11).Value = 9
If Cells(i, 7).Value = "BBB" Then Cells(i, 11).Value = 10
If Cells(i, 7).Value = "BBB-" Then Cells(i, 11).Value = 11
If Cells(i, 7).Value = "BB+" Then Cells(i, 11).Value = 12
If Cells(i, 7).Value = "BB" Then Cells(i, 11).Value = 13
If Cells(i, 7).Value = "BB-" Then Cells(i, 11).Value = 14
If Cells(i, 7).Value = "B+" Then Cells(i, 11).Value = 17
If Cells(i, 7).Value = "B" Then Cells(i, 11).Value = 18
If Cells(i, 7).Value = "B-" Then Cells(i, 11).Value = 19
If Cells(i, 7).Value = "CCC" Then Cells(i, 11).Value = 20
If Cells(i, 7).Value = "CC" Then Cells(i, 11).Value = 21
If Cells(i, 7).Value = "D" Then Cells(i, 11).Value = 22
Next i
End Sub
Si qqun voit l'erreur, ce serait sympa de m 'aider.
Merci.
Reeaz
j'ai une feuille de calcul, sur la collonne F j'ai des notes pr chaque note j'aimerai asscosier une valeur 4 collonnes plus loin, j'ai crée une macro mais ca ne marche pas, la voila:
Sub Chiffre1()
fin = Range("F2").End(xlDown).Row
For i = 2 To fin
If Cells(i, 7).Value = "Etat" Then Cells(i, 11).Value = 1
If Cells(i, 7).Value = "NR" Then Cells(i, 11).Value = 23
If Cells(i, 7).Value = "AAA" Then Cells(i, 11).Value = 2
If Cells(i, 7).Value = "AA+" Then Cells(i, 11).Value = 3
If Cells(i, 7).Value = "AA" Then Cells(i, 11).Value = 4
If Cells(i, 7).Value = "AA-" Then Cells(i, 11).Value = 5
If Cells(i, 7).Value = "A+" Then Cells(i, 11).Value = 6
If Cells(i, 7).Value = "A" Then Cells(i, 11).Value = 7
If Cells(i, 7).Value = "A-" Then Cells(i, 11).Value = 8
If Cells(i, 7).Value = "BBB+" Then Cells(i, 11).Value = 9
If Cells(i, 7).Value = "BBB" Then Cells(i, 11).Value = 10
If Cells(i, 7).Value = "BBB-" Then Cells(i, 11).Value = 11
If Cells(i, 7).Value = "BB+" Then Cells(i, 11).Value = 12
If Cells(i, 7).Value = "BB" Then Cells(i, 11).Value = 13
If Cells(i, 7).Value = "BB-" Then Cells(i, 11).Value = 14
If Cells(i, 7).Value = "B+" Then Cells(i, 11).Value = 17
If Cells(i, 7).Value = "B" Then Cells(i, 11).Value = 18
If Cells(i, 7).Value = "B-" Then Cells(i, 11).Value = 19
If Cells(i, 7).Value = "CCC" Then Cells(i, 11).Value = 20
If Cells(i, 7).Value = "CC" Then Cells(i, 11).Value = 21
If Cells(i, 7).Value = "D" Then Cells(i, 11).Value = 22
Next i
End Sub
Si qqun voit l'erreur, ce serait sympa de m 'aider.
Merci.
Reeaz