Effacer le contenu de cellules en fonction d'une autre
Résolu/Fermé
delph42
Messages postés
7
Date d'inscription
jeudi 4 mai 2023
Statut
Membre
Dernière intervention
16 mai 2023
-
15 mai 2023 à 18:20
delph42 Messages postés 7 Date d'inscription jeudi 4 mai 2023 Statut Membre Dernière intervention 16 mai 2023 - 16 mai 2023 à 11:44
delph42 Messages postés 7 Date d'inscription jeudi 4 mai 2023 Statut Membre Dernière intervention 16 mai 2023 - 16 mai 2023 à 11:44
3 réponses
Le Pingou
Messages postés
12241
Date d'inscription
mercredi 11 août 2004
Statut
Contributeur
Dernière intervention
19 février 2025
1 458
15 mai 2023 à 18:45
15 mai 2023 à 18:45
Bonjour,
Avant de poursuivre, est-ce que le code de cette macro fonctionne?
Merci du retour.
Le Pingou
Messages postés
12241
Date d'inscription
mercredi 11 août 2004
Statut
Contributeur
Dernière intervention
19 février 2025
1 458
15 mai 2023 à 21:54
15 mai 2023 à 21:54
Bonjour,
En attendant le retour, l'instruction suivante devrait suffire, à placer dans votre code!
If Range("K3") = "KDC" Then
Range("H28:I45,K28:K45").ClearContents
End If
ccm81
Messages postés
10907
Date d'inscription
lundi 18 octobre 2010
Statut
Membre
Dernière intervention
24 janvier 2025
2 430
15 mai 2023 à 22:14
15 mai 2023 à 22:14
Re
Private Sub Worksheet_Change(ByVal Target As Range) If Target.Count > 1 Then Exit Sub If Not Intersect(Target, Range("F28")) Is Nothing Then Range("F30").ClearContents: Exit Sub If Not Intersect(Target, Range("S7")) Is Nothing Then Range("S11:S17").ClearContents: Exit Sub If Not Intersect(Target, Range("S11")) Is Nothing Then Range("S13:S17").ClearContents: Exit Sub If Not Intersect(Target, Range("S13")) Is Nothing Then Range("S14:S17").ClearContents: Exit Sub If Not Intersect(Target, Range("K3")) Is Nothing Then If Target.Value = "KDC" Then Union(Range("H28:I45"), Range("K28:K45")).ClearContents: Exit Sub End If End Sub
Cdlmnt
delph42
Messages postés
7
Date d'inscription
jeudi 4 mai 2023
Statut
Membre
Dernière intervention
16 mai 2023
16 mai 2023 à 11:44
16 mai 2023 à 11:44
SUper ! ca marche parfaitement !!!! Merciii !!
16 mai 2023 à 09:45
Bonjour !
Oui ma formule ci dessous fonctionne parfaitement :)