Bonjour,
Je voudrais faire fonctionner les deux macro suivante sur une seule feuille Excel. Actuellement chacune fonctionne bien séparément. Les macros ont le même nom mais je ne sais pas les renommer, en faisant Worksheet_Change2 cela ne fonctionne pas
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address <> "$H$4" Then Exit Sub
If Target = "" Then Exit Sub
lig = Application.Match([H4], [B:B], 0)
If Not IsNumeric(lig) Then MsgBox "inexistant": Exit Sub
Rows(lig).Select
If MsgBox("Souhaitez-vous Valider ?", vbExclamation + vbYesNo, "Inscrire OK") = vbNo Then [H4] = "": Exit Sub
Application.EnableEvents = False
Cells(lig, 1) = "OK": [H4] = ""
Application.EnableEvents = True
End Sub
______________________________________________________________________________________________________
Option Explicit
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Cells.Count > 1 Then Exit Sub
If Target.Column = 1 And Target.Value = "ok" Then Range("L" & Target.Row) = Range("L" & Target.Row) + 1
End Sub
Merci de votre aide