Ask a question »

Excel-VBA - Copy/paste cells then move to next row

August 2015


[Excel-VBA] Copy/paste cells then move to next row




Issue


I am making a questionaire. When the questionaire is complete I want to copy the answers to another worksheet then reset the answers to zero then fill out the questionaire again. I want the next set of data to go into the row below the previous set of collected data. I can copy the range to another worksheet and reset the answers but I do not know how to take the second set of data and copy it to the row below the previous collected data.

Solution


"Copy it to the row below the previous collected data. "
  • After copy statement:
  • Worksheets(destination sheet name within doublequotes).cells(rows.count,"A").end(xlup).offset(1,0).pastespecial


Thanks to Venkat1926 for this tip.
For unlimited offline reading, you can download this article for free in PDF format:
Excel-vba-copy-paste-cells-then-move-to-next-row.pdf

See also

In the same category

Published by aakai1056.
This document entitled « Excel-VBA - Copy/paste cells then move to next row » from CCM (ccm.net) is made available under the Creative Commons license. You can copy, modify copies of this page, under the conditions stipulated by the license, as this note appears clearly.