Sub nnnn()
Dim a, b(4) As Integer, i As Integer, f As Integer, m As Integer, L As Integer
Columns("H:M").ClearContents
a = Worksheets("NEW_VB_config").Range("o2:o12") 'nom des 11 feuilles
For i = 2 To 100
For L = 1 To 6
For f = 1 To 11 'boucle sur les feuilles
If a(f, 1) <> "" Then
With Worksheets(a(f, 1))
If .Range("ao" & i).Value <> "" And .Range("a" & i).Value = ActiveSheet.Range("a1").Value Then
For m = 1 To 4
b(m) = Mid(.Range("ao" & i), m, 1)
' Q
If ActiveCell.Activate Then
If ActiveCell.Row = 2 And ActiveCell.Column = 2 And .Range("a" & i).Value = ActiveSheet.Range("a1").Value And b(1) = 1 Then
ActiveSheet.Cells(i, L + 7) = .Cells(i, L)
ElseIf ActiveCell.Row = 3 And ActiveCell.Column = 2 And b(1) = 2 Then
ActiveSheet.Cells(i, L + 7) = .Cells(i, L)
ElseIf ActiveCell.Row = 4 And ActiveCell.Column = 2 And b(1) = 3 Then
ActiveSheet.Cells(i, L + 7) = .Cells(i, L)
ElseIf ActiveCell.Row = 5 And ActiveCell.Column = 2 And b(1) = 4 Then
ActiveSheet.Cells(i, L + 7) = .Cells(i, L)
'C
ElseIf ActiveCell.Row = 2 And ActiveCell.Column = 3 And b(2) = 1 Then
ActiveSheet.Cells(i, L + 7) = .Cells(i, L)
ElseIf ActiveCell.Row = 3 And ActiveCell.Column = 3 And b(2) = 2 Then
ActiveSheet.Cells(i, L + 7) = .Cells(i, L)
ElseIf ActiveCell.Row = 4 And ActiveCell.Column = 3 And b(2) = 3 Then
ActiveSheet.Cells(i, L + 7) = .Cells(i, L)
ElseIf ActiveCell.Row = 5 And ActiveCell.Column = 3 And b(2) = 4 Then
ActiveSheet.Cells(i, L + 7) = .Cells(i, L)
'D
ElseIf ActiveCell.Row = 2 And ActiveCell.Column = 4 And b(3) = 1 Then
ActiveSheet.Cells(i, L + 7) = .Cells(i, L)
ElseIf ActiveCell.Row = 3 And ActiveCell.Column = 4 And b(3) = 2 Then
ActiveSheet.Cells(i, L + 7) = .Cells(i, L)
ElseIf ActiveCell.Row = 4 And ActiveCell.Column = 4 And b(3) = 3 Then
ActiveSheet.Cells(i, L + 7) = .Cells(i, L)
ElseIf ActiveCell.Row = 5 And ActiveCell.Column = 4 And b(3) = 4 Then
ActiveSheet.Cells(i, L + 7) = .Cells(i, L)
'P
ElseIf ActiveCell.Row = 2 And ActiveCell.Column = 5 And b(4) = 1 Then
ActiveSheet.Cells(i, L + 7) = .Cells(i, L)
ElseIf ActiveCell.Row = 3 And ActiveCell.Column = 5 And b(4) = 2 Then
ActiveSheet.Cells(i, L + 7) = .Cells(i, L)
ElseIf ActiveCell.Row = 4 And ActiveCell.Column = 5 And b(4) = 3 Then
ActiveSheet.Cells(i, L + 7) = .Cells(i, L)
ElseIf ActiveCell.Row = 5 And ActiveCell.Column = 5 And b(4) = 4 Then
ActiveSheet.Cells(i, L + 7) = .Cells(i, L)
End If
End If
Next m
End If
End With
End If
Next f
Next L
Next i
End Sub