Sub Calcul()
Dim P As Range, tablo, i&, txt$, s, j%, v As Variant
Set P = [A15].CurrentRegion.Resize(, 2)
With [A1].CurrentRegion.Resize(, 4)
tablo = .Value 'matrice, plus rapide
For i = 2 To UBound(tablo)
txt = tablo(i, 2)
s = Split(Replace(Replace(Replace(Replace(Replace(txt, "AND", ""), "OR", ""), "NOT", ""), "(", ""), ")", ""))
For j = 0 To UBound(s)
v = Application.VLookup(s(j), P, 2, 0)
If Not IsError(v) Then txt = Replace(txt, s(j), IIf(LCase(v) = "x", 1, 0))
Next j
txt = Replace(Replace(Replace(txt, "AND", "*"), "OR", "+"), " ", "")
txt = Replace(Replace(txt, "NOT1", "NOT(1)"), "NOT0", "NOT(0)") 'ajoute les parenthèses s'il n'y en a pas
tablo(i, 3) = txt
tablo(i, 4) = Evaluate(txt)
Next i
.Value = tablo
End With
End Sub