Bonjour qdf97, le forum,
Un essai...
Sub test()
Dim dl As Integer, col As Integer
Dim nom As Range, ws As Worksheet, plage As Range
Application.ScreenUpdating = False
Set ws = Sheets("Sheet1")
With Sheets("Sheet2")
dl = .Range("A" & Rows.Count).End(xlUp).Row
For i = 3 To ws.Range("A" & Rows.Count).End(xlUp).Row
Set nom = .Rows("1:1").Find(ws.Range("A" & i), LookIn:=xlValues)
If Not nom Is Nothing Then
col = nom.Column
Set plage = Range(.Cells(2, col), .Cells(dl, col))
ws.Range("A" & i).Offset(0, 2) = WorksheetFunction.Average(plage): ws.Range("A" & i).Offset(0, 2).NumberFormat = "0.0"
End If
Next i
End With
End Sub
CTRL + e pour exécuter la macro
Cordialement,