Private Sub Worksheet_Activate()
Worksheet_Change [A1] 'lance la macro
End Sub
Private Sub Worksheet_Change(ByVal Target As Range)
Application.EnableEvents = False 'désactive les évènements
On Error Resume Next
With Sheets(CStr([C2])).UsedRange
.Columns(3).Name = "P" 'plage nommée
.Columns(4).Name = "Q" 'plage nommée
[C4] = .Cells(Application.Match(1, [(P<>"")*(Q="")], 0), 3)
End With
If Err Then [C4] = "" 'RAZ
Application.EnableEvents = True 'réactive les évènements
End Sub