Sub aDoubleEntree()
Dim t, tpremcol, tpremlig, i&, k&, m&, n&
Application.ScreenUpdating = False
t = Sheets("souhait").Range("a1").CurrentRegion
With Sheets("RevenirInitial")
.Range("a1").CurrentRegion.Clear
.Columns(3).NumberFormat = "@"
.Range("a1").Resize(UBound(t), 3) = t
.Columns("a:b").RemoveDuplicates Columns:=Array(1, 2), Header:=xlYes
.Columns(3).RemoveDuplicates Columns:=1, Header:=xlYes
tpremcol = .Range(.Range("a2"), .Cells(.Rows.Count, "b").End(xlUp))
tpremlig = .Range(.Range("c2"), .Cells(.Rows.Count, "c").End(xlUp))
ReDim r(1 To UBound(tpremcol), 1 To UBound(tpremlig))
For i = 2 To UBound(t)
For m = 1 To UBound(tpremcol)
If tpremcol(m, 1) = t(i, 1) And tpremcol(m, 2) = t(i, 2) Then Exit For
Next m
For n = 1 To UBound(tpremlig)
If tpremlig(n, 1) = t(i, 3) Then Exit For
Next n
If m <= UBound(tpremcol) And n <= UBound(tpremlig) Then r(m, n) = t(i, 4)
Next i
.Range("a1").CurrentRegion.Clear
.Range("c2").Resize(UBound(tpremcol), UBound(tpremlig)) = r
.Range("a1").Resize(, UBound(tpremlig) + 2).NumberFormat = "@"
.Range("c1").Resize(, UBound(tpremlig)) = Application.Transpose(tpremlig)
.Range("a2").Resize(UBound(tpremcol), 2) = tpremcol
.Range("a1") = "Libellé": .Range("b1") = "Libellé2"
.Range("a1").CurrentRegion.Borders.LineStyle = xlContinuous
.Range("a1").CurrentRegion.Columns("a:b").Interior.Color = RGB(222, 222, 222)
.Range("a1").CurrentRegion.Rows("1:1").Interior.Color = RGB(222, 222, 222)
.Range("a1").CurrentRegion.Rows("1:1").HorizontalAlignment = xlCenter
End With
End Sub