P patojo Jan 31, 2008 #1 Does anyone have a VB script that will copy and paste values from one row to the last row on a worksheet?
Does anyone have a VB script that will copy and paste values from one row to the last row on a worksheet?
D Dave Peterson Jan 31, 2008 #2 I used column A to find the last row of the worksheet and I pasted under that last row. Dim NextRow as long dim RowToCopy as range set rowtocopy = activecell.entirerow with worksheets("somesheetnameHere") Nextrow = .cells(.rows.count,"A").end(xlup).row + 1 rowtocopy.copy _ destination:=.cells(nextrow,"A") end with
I used column A to find the last row of the worksheet and I pasted under that last row. Dim NextRow as long dim RowToCopy as range set rowtocopy = activecell.entirerow with worksheets("somesheetnameHere") Nextrow = .cells(.rows.count,"A").end(xlup).row + 1 rowtocopy.copy _ destination:=.cells(nextrow,"A") end with
R Ron de Bruin Jan 31, 2008 #3 See also this page if it is possible that the cell in A is empty http://www.rondebruin.nl/copy1.htm