Fais Ctrl+Maj+N (comme "notation") à partir de la seconde semaine
Il faut qu'elles soient dans l'ordre
J'ai mis le résultat en colonne BA pour comparer, je ne trouve pas toujours la même chose, pourrais tu vérifier ?
Option Explicit
Sub dejanote()
If ActiveSheet.Index > 2 Then
Dim note As Object, resultat(), tbl, derL As Long, i As Long, n%, fap As Worksheet, fav As Worksheet
Set fap = ActiveSheet
Set fav = Sheets(ActiveSheet.Index - 1) ' feuille avant
Set note = CreateObject("Scripting.Dictionary")
derL = fav.Cells(Rows.Count, "G").End(xlUp).Row
tbl = fav.Range("G2:AY" & derL).Value
n = UBound(tbl, 2)
For i = 1 To UBound(tbl)
note(tbl(i, 1) & "|" & tbl(i, 2)) = tbl(i, n)
Next
derL = fap.Cells(Rows.Count, "G").End(xlUp).Row
tbl = fap.Range("G2:H" & derL).Value
ReDim resultat(1 To UBound(tbl))
For i = 1 To UBound(tbl)
resultat(i) = note(tbl(i, 1) & "|" & tbl(i, 2))
Next
fap.Range("BA2").Resize(UBound(resultat), 1) = Application.Transpose(resultat)
End If
End Sub