Macro that goes to next blank cell

Solved/Closed
-
 Fruits and Veggies -
Hello,
im using excel 2007 and I have a cell which I input a number inn and then a macro that runs copying the contents to another column which then adds the contents up. but when the macro is run again I want it to copy the contents into the next blank cell within that column every time it is re run.

here's the macro

1 reply

Posts
4476
Registration date
Thursday January 28, 2010
Status
Contributor
Last seen
August 2, 2020
768
I dont know how you are getting to that column/cell

but this gives you last row that has been used


lastrow=cells(65536, 1).end(xlup).row

1 refers to column A, it finds the last used column in A (unless nothing is in col A in which case 1 is returned)
That didn't work. I'm getting to column j By clickin on j2 with mouse as the macro was recorded but after j2 has been used I want the macro then to copy data to the cell below which is blank. And then hAve the macro do thAt agin So it is as if it is plus 1 after each time it is run
Posts
4476
Registration date
Thursday January 28, 2010
Status
Contributor
Last seen
August 2, 2020
768 > Dbibb
post the relevant portion of the code
>
Posts
4476
Registration date
Thursday January 28, 2010
Status
Contributor
Last seen
August 2, 2020

i dont understand ive posted the whole code at the top of thread
Posts
4476
Registration date
Thursday January 28, 2010
Status
Contributor
Last seen
August 2, 2020
768 > dbibb
I dont see it. It says there is the macro, where is the code ?
oh yea ops I guess the copy paste didnt work... sorry here

Sub prt()
'
' prt Macro
'

'
Range("B10").Select
Selection.Copy
Range("J2").Select
ActiveSheet.Paste
Range("B10").Select
ActiveSheet.Paste
Application.CutCopyMode = False
ActiveCell.FormulaR1C1 = ""
Range("B11").Select

End Sub