I am trying to devise a macro that copies the values from cells P1:P100 (for example) and then find the next blank cell in column B and paste the values from P there.
Thank you!
I am trying to devise a macro that copies the values from cells P1:P100 (for example) and then find the next blank cell in column B and paste the values from P there.
Thank you!
[vba]
LastRow = Cells(Rows.Count, "B").End(xlUp).Row
Range("P1:P100").Copy Cells(LastRow+1, "B")
[/vba]
____________________________________________
Nihil simul inventum est et perfectum
Abusus non tollit usum
Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
James Thurber
Thanks! What if I want to do the same thing except I want the column P values to be coming from a different worksheet (So I want P1:P100 on sheet1 to be copied to the first blank cell in column D on sheet2).
Thank you!
[vba]
With Worksheets("Sheet2")
LastRow = .Cells(.Rows.Count, "B").End(xlUp).Row
Worksheets("Sheet1").Range("P1:P100").Copy .Cells(LastRow+1, "D")
End With
[/vba]
____________________________________________
Nihil simul inventum est et perfectum
Abusus non tollit usum
Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
James Thurber