D
dhunter43
I am trying to move the datavalues from row2(worksheet2,"a2:ab2") to
worksheet3 next available blank row then clear the contents from cells
(c2:c10) in worksheet1. This line of code works fine for everything but
pasting to the next available blank row in worksheet3. It pastes the data
into row19 everytime overwriting previously input data. Worksheet3 has column
headings in row1 and blank rows from a2:A64000, except for row19 obviously.
Everything in the code works correctly except for lines 5 & 6. The line
numbers are not part of the code. I added them to simply communications.
1 Sheets("Formulas").Select
2 ActiveSheet.Range("a2:ab2").Select
3 Selection.Copy
4 Sheets("OperationalRates").Select
5 LastRow = Cells(Rows.Count, "a").End(xlUp).Row + 1
6 ActiveSheet.Rows(LastRow & ":" & LastRow).Select
7 Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks:=False, Transpose:=False
8 Sheets("InputForm").Range("c2:c10").ClearContents
End Sub
worksheet3 next available blank row then clear the contents from cells
(c2:c10) in worksheet1. This line of code works fine for everything but
pasting to the next available blank row in worksheet3. It pastes the data
into row19 everytime overwriting previously input data. Worksheet3 has column
headings in row1 and blank rows from a2:A64000, except for row19 obviously.
Everything in the code works correctly except for lines 5 & 6. The line
numbers are not part of the code. I added them to simply communications.
1 Sheets("Formulas").Select
2 ActiveSheet.Range("a2:ab2").Select
3 Selection.Copy
4 Sheets("OperationalRates").Select
5 LastRow = Cells(Rows.Count, "a").End(xlUp).Row + 1
6 ActiveSheet.Rows(LastRow & ":" & LastRow).Select
7 Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks:=False, Transpose:=False
8 Sheets("InputForm").Range("c2:c10").ClearContents
End Sub