Hi,
I have written a macro to take a figure from one cell on one worksheet (cashing up sheet) and insert it in the last empty cell of a row in another worksheet. (daily figures sheet)
The problem I have is that it is erasing the figure immediately to the right of the cell where the data is being written to.
As I'm not very good with macros I'm not sure which part I need to edit or what I should edit it to.
The code is as follows.
Range("E34").Select
Selection.Copy
Sheets("Daily figures").Select
lMaxRows = Cells(Rows.Count, "AZ").End(xlUp).Row
Range("AZ" & lMaxRows + 1).Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Sheets("Cashing-up Sheet").Select
This is exactly as the code is written. Can anyone identify the problem?
Thank you in advance.
Michael
edit - this is just the section of the code relating to this issue. The remainder of the code has been omitted for clarity.
I have written a macro to take a figure from one cell on one worksheet (cashing up sheet) and insert it in the last empty cell of a row in another worksheet. (daily figures sheet)
The problem I have is that it is erasing the figure immediately to the right of the cell where the data is being written to.
As I'm not very good with macros I'm not sure which part I need to edit or what I should edit it to.
The code is as follows.
Range("E34").Select
Selection.Copy
Sheets("Daily figures").Select
lMaxRows = Cells(Rows.Count, "AZ").End(xlUp).Row
Range("AZ" & lMaxRows + 1).Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Sheets("Cashing-up Sheet").Select
This is exactly as the code is written. Can anyone identify the problem?
Thank you in advance.
Michael
edit - this is just the section of the code relating to this issue. The remainder of the code has been omitted for clarity.