Please help
I have searched the web and tried every solution I have found, none worked.
I am trying to copy a range of cells, say T2,AB5 to another sheet. Problem is I don't know where this well appear so have to set a variable.
It may appear several times throughout the data sheet.
each occurrence must be copied to another sheet in succession.
T2,AB5 to sheet2 D6,L9
T33,AB36 to sheet 2 D10,L13
and so on
This is the code I am trying to make work but get a Run-time error '1004': Application-defined or object-defined error
Please tell me what I am doing wrong with this code line??
DestLR is the variable and is dim as Long
I have searched the web and tried every solution I have found, none worked.
I am trying to copy a range of cells, say T2,AB5 to another sheet. Problem is I don't know where this well appear so have to set a variable.
It may appear several times throughout the data sheet.
each occurrence must be copied to another sheet in succession.
T2,AB5 to sheet2 D6,L9
T33,AB36 to sheet 2 D10,L13
and so on
This is the code I am trying to make work but get a Run-time error '1004': Application-defined or object-defined error
Please tell me what I am doing wrong with this code line??
DestLR is the variable and is dim as Long
Code:
Worksheets("Wells").Range(Sheets("Wells").Cells(DestLR, 20), Sheets("Wells").Cells(DestLR + 3, 36)).Copy
Sheets("Summary").Range(DestLR5, 7).PasteSpecial xlPasteValues