Hi Guys
I can't figure out how to get this code right:
Basically I want a code to identify last row in column A, copy that cell to from the cell below to the cell in last row in the data sheet. So with the simple example:
I want to copy 2/8/2015 to the two empty cell below, which has the same row numbers as column B.
Everything else worked apart from the last paste to the desired range I want.
What I had was:
Range("A" & LastRow + 1, ["A" & Cells(Rows.Count, "B").End(xlUp).Row]).PasteSpecial
This doesn't work either:
Range("A"& LastRow + 1: "A" & Cells(Row.Count, "B").End(xlUp).Row).PasteSpecial
LastRow has already been defined as the last row of column A
[TABLE="width: 500"]
<tbody>[TR]
[TD]
Date
[/TD]
[TD]Product[/TD]
[/TR]
[TR]
[TD]1/8/2015[/TD]
[TD]A[/TD]
[/TR]
[TR]
[TD]2/8/2015[/TD]
[TD]B[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]C[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]D[/TD]
[/TR]
</tbody>[/TABLE]
I can't figure out how to get this code right:
Basically I want a code to identify last row in column A, copy that cell to from the cell below to the cell in last row in the data sheet. So with the simple example:
I want to copy 2/8/2015 to the two empty cell below, which has the same row numbers as column B.
Everything else worked apart from the last paste to the desired range I want.
What I had was:
Range("A" & LastRow + 1, ["A" & Cells(Rows.Count, "B").End(xlUp).Row]).PasteSpecial
This doesn't work either:
Range("A"& LastRow + 1: "A" & Cells(Row.Count, "B").End(xlUp).Row).PasteSpecial
LastRow has already been defined as the last row of column A
[TABLE="width: 500"]
<tbody>[TR]
[TD]
Date
[/TD]
[TD]Product[/TD]
[/TR]
[TR]
[TD]1/8/2015[/TD]
[TD]A[/TD]
[/TR]
[TR]
[TD]2/8/2015[/TD]
[TD]B[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]C[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]D[/TD]
[/TR]
</tbody>[/TABLE]