N
Nikos Yannacopoulos
Ian,
Try this:
In the copied from sheet, without inserting blank lines:
Range("A1").select
Range(Selection, Selection.end(xlToRight)).Select
Range(Selection, Selection.end(xlDown)).Select
Selection.Copy
In the copied to sheet:
Range("A4").Select
Selection.PasteSpecial....
This way you will only copy the populated range.
Important: no gaps in row 1 and Column A!
If you have gaps in row 1 but not in column A, you could
alternatively copy entire rows:
Rows("1").Select
Range(Selection, Selection.end(xlDown)).Select
Selection.Copy
Caution: If it may be that the range you are pasting is
narrower / shorter than the previous one, you will need to
clear the old data first. You can do so by selecting in
the same manner and deleting / clearing contents.
Nikos
Try this:
In the copied from sheet, without inserting blank lines:
Range("A1").select
Range(Selection, Selection.end(xlToRight)).Select
Range(Selection, Selection.end(xlDown)).Select
Selection.Copy
In the copied to sheet:
Range("A4").Select
Selection.PasteSpecial....
This way you will only copy the populated range.
Important: no gaps in row 1 and Column A!
If you have gaps in row 1 but not in column A, you could
alternatively copy entire rows:
Rows("1").Select
Range(Selection, Selection.end(xlDown)).Select
Selection.Copy
Caution: If it may be that the range you are pasting is
narrower / shorter than the previous one, you will need to
clear the old data first. You can do so by selecting in
the same manner and deleting / clearing contents.
Nikos