A
anber
Guest
Bonjour,
Peut-on simplicier le code suivant ?
Sub page()
Dim cel As Range
Dim c As Range
For Each cel In Sheets("Moa").Range("N5K5")
For Each c In Range("J3:J1167")
If c = cel Then
c.Offset(0, 1) = cel.Offset(1, 0)
End If
Next
Next
For Each cel In Sheets("Mov").Range("N5K5")
For Each c In Range("J3:J1167")
If c = cel Then
c.Offset(0, 2) = cel.Offset(1, 0)
End If
Next
Next
For Each cel In Sheets("PP").Range("N5K5")
For Each c In Range("J3:J1167")
If c = cel Then
c.Offset(0, 3) = cel.Offset(1, 0)
End If
Next
Next
For Each cel In Sheets("Che").Range("N5K5")
For Each c In Range("J3:J1167")
If c = cel Then
c.Offset(0, 4) = cel.Offset(1, 0)
End If
Next
Next
End Sub
Merci
Peut-on simplicier le code suivant ?
Sub page()
Dim cel As Range
Dim c As Range
For Each cel In Sheets("Moa").Range("N5K5")
For Each c In Range("J3:J1167")
If c = cel Then
c.Offset(0, 1) = cel.Offset(1, 0)
End If
Next
Next
For Each cel In Sheets("Mov").Range("N5K5")
For Each c In Range("J3:J1167")
If c = cel Then
c.Offset(0, 2) = cel.Offset(1, 0)
End If
Next
Next
For Each cel In Sheets("PP").Range("N5K5")
For Each c In Range("J3:J1167")
If c = cel Then
c.Offset(0, 3) = cel.Offset(1, 0)
End If
Next
Next
For Each cel In Sheets("Che").Range("N5K5")
For Each c In Range("J3:J1167")
If c = cel Then
c.Offset(0, 4) = cel.Offset(1, 0)
End If
Next
Next
End Sub
Merci