bonjour,
je me permets d'écrire le tout petit bout de code:
For Each c In Range("B6:B" & Range("B" & Rows.Count).End(xlUp).Row)
If c.Value = Range("g43") Then
If c.Row < 27 Then
MsgBox ("effacement imposible")
'Range(Cells(c.Row, "B"), Cells(c.Row, "F")).ClearContents
Else 'rouge non effacé
flag = 1
Range(Cells(c.Row, "B"), Cells(c.Row, "e")).ClearContents 'efface 1ere partie tableau
Range(Cells(c.Row, "g"), Cells(c.Row, "al")).ClearContents 'efface 2eme partie tableau
ligne qui ne marche pas : Range(Cells(c.Row, "al")) = "pas de notes"
flag = 0
End If
Exit For
End If
Next c
End Sub
je n'arrive pas à écrire "pas de notes" dans la ligne variable en "al"...j'ai un retour erreur 400