Imcompatibilité de type if-and
Bonjour,
J'ai un probleme avec mon IF dont voici le code, le problème ce situe sur la ligne du IF si quelqu'un à une suggestion.
Ce If me permet:
Si en "AE" il y a "CONTRACTUEL" et que en "A"I il y a "Indemnités" alors je remplace le "Indemnités" en "AE" par "Vacations"
Code:
1 2 3 4 5 6 7 8 9 10 11 12
|
Sub VII()
Dim i As Long
With Worksheets(1)
For i = 2 To .Range("AE" & .Rows.Count).End(xlUp).Row
If .Range("AE" & i) = "CONTRACTUEL" And .Range("AI" & i) = "Indemnités" Then
.Range("AI" & i) = "Vacations"
End If
Next i
End With
End Sub |
Merci