Past formula to the end

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

If I have spreadsheet that changes in row size and want to copy formula from column K2 and past the formula to the last row. Despite sometimes it ends at 1303 or 1500
Thanks
D
 
Thanks, got it to work
Dim LastRow As Lon
Dim LastCol As Lon
Dim rng As Rang

With ActiveShee
Set rng = .UsedRange 'try to reset lastused cel
With rn
LastRow = .Rows(.Rows.Count).Ro
LastCol = .Columns(.Columns.Count).Colum
End Wit

.Range("K2").AutoFill
Destination:=.Range("K2:K" & LastRow), Type:=xlFillDefaul

End Wit
 
Back
Top