1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
| Private Sub Worksheet_Change(ByVal Target As Range)
Dim Cel As Range
Dim Pla As Range
Dim x As String
Set Pla = Intersect(Target, Range("D15:I65536"))
If Pla Is Nothing Then Exit Sub
For Each Cel In Pla
If Not (IsEmpty(Pla)) Then
If Cells(Cel.Row, "C") Like "épargnant" And _
Cel.Column > 6 Then
Cel.Offset(0, -3) = Cel
Cel.ClearContents
End If
If Cells(Cel.Row, "C") Like "allocataire" And _
Cel.Column < 7 Then
Cel.Offset(0, 3) = Cel
Cel.ClearContents
End If
End If
Next Cel
End Sub |
Partager