Export Last Completed Row of Sheet to a New Spreadsheet

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

Guest

Good Afternoon,

I have a user form upon which users enter information. That information is
then submitted to the master Log.

Question: Is there code i can run that will search the master log, select
the last row and export it to a new Excel Sheet. This sheet will then be
used as an attachment.

Any help would be great!
 
Fire from anywhere in the workbook.

Sub copylastrowinanothersheet()
With Sheets("sheet11") 'source
..Rows(.Cells(Rows.Count, "a").End(xlUp).Row).Copy _
Sheets("sheet16").Rows(14) 'destination
End With
End Sub
 
Hi there,
I tried the code you provided, but i got an error stating 'out of
subscription range'
any ideas?

With Sheets("Site Reading Log") 'source
..Rows(.Cells(Rows.Count, "1").End(xlUp).Row).Copy _
Sheets("Exported").Rows(14) 'destination
End With
 
try changing
Rows.Count, "1").End(xlUp).
to
Rows.Count, "a").End(xlUp) as I posted
or
Rows.Count,1).End(xlUp) without quotes
 

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