Salut TomateParis,
en postulant donc que l'en-tête de la colonne "Risque" soit... "Risque" ou "Risques" et l'en-tête de la première colonne des "Titres" soit... "Titre", voire "Titres" la macro se contente d'un double-clic n'importe où sur la feuille pour détecter les colonnes et lignes concernées par le calcul.
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
'
Dim tRISK, tYN, tBDD, rCel As Range, iRow%, iTRow%, iCol%
'
Cancel = True
'
On Error Resume Next
'Recherche la colonne "Risques"
Set rCel = Rows(4).Find(what:="Risque", lookat:=xlPart, LookIn:=xlValues, searchdirection:=xlNext)
If Not rCel Is Nothing Then
iTRow = rCel.Row
iRow = Range(fctCol(rCel.Column) & Rows.Count).End(xlUp).Row
tRISK = Range(fctCol(rCel.Column) & iTRow).Resize(iRow - (iTRow - 1), 1).Value
'Recherche la première colonne "Titre"
Set rCel = Rows(iTRow).Find(what:="Titre", lookat:=xlPart, LookIn:=xlValues, searchdirection:=xlNext)
If Not rCel Is Nothing Then
iCol = Cells(iTRow, Columns.Count).End(xlToLeft).Column
tYN = Range(fctCol(rCel.Column) & iTRow & ":" & fctCol(iCol) & iRow).Formula
'BDD
tBDD = Worksheets("BDD").[A2].CurrentRegion.Value
'
For x = 2 To UBound(tRISK, 1)
For y = 2 To UBound(tBDD, 2)
If tBDD(1, y) = tRISK(x, 1) Then
For Z = 1 To UBound(tYN, 2)
If tYN(1, Z) <> "Synthese" Then
For k = 2 To UBound(tBDD, 1)
If tBDD(k, 1) = tYN(1, Z) Then _
tYN(x, Z) = tBDD(k, y): _
Exit For
Next
End If
Next
Exit For
End If
Next
Next
'Affichage résultats
Range(fctCol(rCel.Column) & iTRow & ":" & fctCol(iCol) & iRow).Formula = tYN
End If
End If
On Error GoTo 0
'
End Sub
À tester, bien sûr, en conditions réelles...
A+