1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
|
Sub Doubler()
Dim CeLL As Range, PlaGe As Range, Oui As Range
Set PlaGe = Range("a5:a" & [a65000].End(xlUp).Row)
For Each CeLL In PlaGe
Set Oui = Columns(16).Find(RTrim(CeLL.Value)) 'rtrim pour supprimer l'espace apres cm010 en colonne1
If Not Oui Is Nothing Then
With Worksheets("pilotage").Columns(3)
Set c = .Find(CeLL, LookIn:=xlValues)
If Not c Is Nothing Then
firstAddress = c.Address
Do
c.Offset(0, -2) = c.Offset(0, -2) * 2
Set c = .FindNext(c)
Loop While Not c Is Nothing And c.Address <> firstAddress
End If
End With
End If
Next CeLL
Columns(16).ClearContents
End Sub |
Partager