Re : Modif macro (possible ?)
Bonjour à tous,
Désolé de revenir pour mon pb de cellules (1 ou +)qui se verrouillent.....alors qu'initialement elles ne l'etaient pas et ceci quand j'execute la macro en question !!!
Mais j'ai remarqué que c'etait tjs dans les même plages: I25:I28 , J42:L42 et K45:L45 ?
je vous joint la macro entiere ci-dessous
Sub f1versf2a()
Sheets("f1").Unprotect "mdp"
Sheets("f2").Unprotect "mdp"
Dim plage As Range, c As Range, cSource As Range
Set plage = Feuil1.Range("D1😀2,F1:F2,C7:K12,D14😀15,F14:F15,C20:G25,D27😀28,F27:F28,C33:L39,D41😀42,F41:F42,C47:J53,I19:I23,I25:I28,K19:L26,K45:L45,J42:L42,L49:L53,N3:N41") 'zones selection pour transfert macro
Application.ScreenUpdating = False
For Each c In plage
If Not IsEmpty(c) And Not c.Locked Then
Set cSource = Sheets("BD").UsedRange.Find(what:=c, LookIn:=xlValues, LookAt:=xlWhole, MatchCase:=False)
If Not cSource Is Nothing Then
If cSource.Offset(0, 8).Value = "A" Then
c.Cut Destination:=Sheets("f2").Range(c.Address)
End If
End If
End If
Next c
Range("J14:J15").Select
ActiveCell.FormulaR1C1 = "B"
Sheets("Plan Mer. P3").Select
Range("J14:J15").Select
ActiveCell.FormulaR1C1 = "A"
plage.Locked = False
Application.ScreenUpdating = True
Sheets("f1").Protect "mdp", AllowFormattingCells:=True
Sheets("f2").Protect "mdp", AllowFormattingCells:=True
End Sub
PS: comment faite-vous pour mettre une fenetre avec vos codes macro donnés en réponse ?