I need to find the last row of data, where the last data entry may be in different columns. I had been using this code, thinking that column B would contain the last data entry. This isn't always the case.
Dim LastRowCopy As Long, LastRowPaste As Long
LastRowCopy = Sheets("PCR Summary").Range("C" & Rows.Count).End(xlUp).Row ' Last used row on "PCR Summary"
Sheets("PCR Summary").Range("A1", "E" & LastRowCopy).Copy _
Destination:=Sheets("PCR Parts Summary").Range("A1"
I tried modifying the LastRowCopy line to say:
LastRowCopy = Sheets("PCR Summary").Range("A:F" & Rows.Count).End(xlUp).Row ' Last used row on "PCR Summary"
but I get an error, Run-Time Error '1004, Application-defined or object defined error.
...anyone? Thanks in advance.
Bookmarks