Bonsoir le Forum ,
voila hier je chercher comment effacer une cellue si je rentre du texte dans une cellule j'ai trouver sur le forum un model merci le forum
maintenat je cherche a simplifier mon code si quelqu'un pourrais mader je sera ravi voici le code repetitif je desir le simplifier mais aucune connaissance
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = "$F$22" Then Range("G22:W22").ClearContents
If Target.Address = "$F$23" Then Range("G23:W23").ClearContents
If Target.Address = "$F$24" Then Range("G24:W24").ClearContents
If Target.Address = "$F$25" Then Range("G25:W25").ClearContents
If Target.Address = "$F$26" Then Range("G26:W26").ClearContents
If Target.Address = "$F$27" Then Range("G27:W27").ClearContents
If Target.Address = "$F$28" Then Range("G28:W28").ClearContents
If Target.Address = "$F$29" Then Range("G29:W29").ClearContents
If Target.Address = "$F$30" Then Range("G30:W30").ClearContents
If Target.Address = "$F$31" Then Range("G31:W31").ClearContents
If Target.Address = "$F$32" Then Range("G32:W32").ClearContents
If Target.Address = "$F$33" Then Range("G33:W33").ClearContents
If Target.Address = "$F$34" Then Range("G34:W34").ClearContents
If Target.Address = "$F$35" Then Range("G35:W35").ClearContents
If Target.Address = "$F$36" Then Range("G36:W36").ClearContents
If Target.Address = "$F$37" Then Range("G37:W37").ClearContents
If Target.Address = "$F$38" Then Range("G38:W38").ClearContents
If Target.Address = "$F$39" Then Range("G39:W39").ClearContents
If Target.Address = "$F$40" Then Range("G40:W40").ClearContents
End Sub
merci le forum MacMac
voila hier je chercher comment effacer une cellue si je rentre du texte dans une cellule j'ai trouver sur le forum un model merci le forum
maintenat je cherche a simplifier mon code si quelqu'un pourrais mader je sera ravi voici le code repetitif je desir le simplifier mais aucune connaissance
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = "$F$22" Then Range("G22:W22").ClearContents
If Target.Address = "$F$23" Then Range("G23:W23").ClearContents
If Target.Address = "$F$24" Then Range("G24:W24").ClearContents
If Target.Address = "$F$25" Then Range("G25:W25").ClearContents
If Target.Address = "$F$26" Then Range("G26:W26").ClearContents
If Target.Address = "$F$27" Then Range("G27:W27").ClearContents
If Target.Address = "$F$28" Then Range("G28:W28").ClearContents
If Target.Address = "$F$29" Then Range("G29:W29").ClearContents
If Target.Address = "$F$30" Then Range("G30:W30").ClearContents
If Target.Address = "$F$31" Then Range("G31:W31").ClearContents
If Target.Address = "$F$32" Then Range("G32:W32").ClearContents
If Target.Address = "$F$33" Then Range("G33:W33").ClearContents
If Target.Address = "$F$34" Then Range("G34:W34").ClearContents
If Target.Address = "$F$35" Then Range("G35:W35").ClearContents
If Target.Address = "$F$36" Then Range("G36:W36").ClearContents
If Target.Address = "$F$37" Then Range("G37:W37").ClearContents
If Target.Address = "$F$38" Then Range("G38:W38").ClearContents
If Target.Address = "$F$39" Then Range("G39:W39").ClearContents
If Target.Address = "$F$40" Then Range("G40:W40").ClearContents
End Sub
merci le forum MacMac