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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top