Je cherche un code permettant de tirer ma formule en G2 automatiquement jusqu'à ma dernière ligne de données (qui change souvent...).
J'ai trouvé ceci sur un autre forum :
Dim LastRow As Long
With Sheets("Final Extraction")
LastRow = .Cells(Rows.Count, "A").End(xlUp).Row
.Range("G2").AutoFill .Range("G" & LastRow)
End With
Re : Code VBA pour tirer automatiquement une fonction jusqu'à la dernière cellule non
Bonjour Pygouv
Avec AutoFill il faut reprendre la source dans la destination:
VB:
Dim LastRow As Long
With Sheets("Final Extraction")
LastRow = .Cells(Rows.Count, "A").End(xlUp).Row
.Range("G2").AutoFill .Range("G2:G" & LastRow)
End With