Synthétiser la formule avec Array()
Bonjour à tous,
Voici mon problème est le suivant:
Je cherche à réduire ce code à l'aide de la fonction array (). J'ai 5 régions C,E,N,S,W. Chaque région porte un name de code et chaque nom de code doit être transcrite sur la feuille. Voici la portion de mon code :
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
| For lignes_test = 0 To x_count
If code_project = Cells(5 + lignes_test, 1) Then
If code_region = "N" Then
Cells(5 + lignes_test, 3) = "North"
GoTo b_exit
If code_region = "C" Then
Cells(5 + lignes_test, 3) = "Central"
GoTo b_exit
If code_region = "E" Then
Cells(5 + lignes_test, 3) = "East"
GoTo b_exit
If code_region = "S" Then
Cells(5 + lignes_test, 3) = "South"
GoTo b_exit
If code_region = "W" Then
Cells(5 + lignes_test, 3) = "West"
GoTo b_exit
End If
End If
End If
End If
End If
End If
b_exit:
Next lignes_test |
Comment puis-je réduire ce morceau en quelques lignes à l'aide de la fonction array (). Merci de votre aide.