XL 2016 optimiser un code

zakariamalki

XLDnaute Nouveau
Bonjour,
comment je peux optimiser ce code vba

Do While i <= f
Worksheets(2).Select
If Cells(i, 1) = "Youness JATTI" And Cells(i, 20) <= lundimanquant And Cells(i, 19) = "" Then
Worksheets(1).Select
c = Range("F23").Value
Range("F23").Value = c + 1
Worksheets(2).Select
ElseIf Cells(i, 1) = "Yousra EL ATTAOUI" And Cells(i, 20) <= lundimanquant And Cells(i, 19) = "" Then
Worksheets(1).Select
c = Range("D23").Value
Range("D23").Value = c + 1
ElseIf Cells(i, 1) = "Lamyae EL MAHMOUDI" And Cells(i, 20) <= lundimanquant And Cells(i, 19) = "" Then
Worksheets(1).Select
c = Range("C23").Value
Range("C23").Value = c + 1
ElseIf Cells(i, 1) = "Meryem FNADI" And Cells(i, 20) <= lundimanquant And Cells(i, 19) = "" Then
Worksheets(1).Select
c = Range("E23").Value
Range("E23").Value = c + 1
ElseIf Cells(i, 1) = "Adam NADIM HANBALI" And Cells(i, 20) <= lundimanquant And Cells(i, 19) = "" Then
Worksheets(1).Select
c = Range("G23").Value
Range("G23").Value = c + 1
End If
i = i + 1
Loop
 

Discussions similaires

Réponses
2
Affichages
248
Réponses
4
Affichages
413

Membres actuellement en ligne

Statistiques des forums

Discussions
314 499
Messages
2 110 249
Membres
110 711
dernier inscrit
chmessi