Hi there,
I have the following code:
What it does is copy all the non-empty cells from column E to a different sheet, at the same column.
It gives me an error message (error '1004', copy and paste area are not the same size). However this only happens if the destination column is empty. If I have a value in row 3, the macro works well (but it erases the value I had in E3).
Is there a workaround that problem?
Thanks for your help
I have the following code:
Code:
Sub test()
Sheets("try1").Select
Range("e2:e" & [e65000].End(xlUp).Row).SpecialCells(xlCellTypeConstants, 23).Copy Sheets("destination").Range("e2:e999").End(xlDown)
End Sub
What it does is copy all the non-empty cells from column E to a different sheet, at the same column.
It gives me an error message (error '1004', copy and paste area are not the same size). However this only happens if the destination column is empty. If I have a value in row 3, the macro works well (but it erases the value I had in E3).
Is there a workaround that problem?
Thanks for your help