Copying used range from other sheets ignoring row 1
Thanks for the reply.
The code itself currently works like this:
Opens each workbook with "Maritime" in the filename and copies a
certain range from that workbook, pasting it into the main workbook
(basebook)
The next workbook pastes underneath the previous one and so on.
At the moment however since the workbook copies the range A2:BP50 and
sometimes workbooks only contain between 1 and 5 rows I would like to
cut out the other 45-49 rows to eliminate blank rows on the main
workbook.
I have tried various solutions to copy only the rows with data present
but unfortunately I have not found a way to leave out the header row
when copying the data.
So in short, I need to change the below code to only copy the used
rows only, exluding row 1:
Set sourceRange = Sheets("Data").Range("A2:BP50")
a = sourceRange.Rows.Count
I hope this is clearer - thanks for your time!
|