Forum Discussion
using VBA to drop down to next row
Hi,
Check this line of your code...
"Worksheets("WIP").Range("A2" & ActiveCell.Row + 1).Offset(1, 0).Select"
The issue is that you're always selecting cell "A2" as your starting point and stepping across to the right by one column and then down one row.
Doing that means that once you've entered data to that area, the next time you run the macro, it goes back to cell "A2" and overwrites the data.
There are several ways to overcome this, one of which could be to insert a new row at this point before adding the data …
"Selection.EntireRow.Insert"
another might be selecting "A2" and then going to the bottom of the page and jumping back up to the empty cell (in column "A") which should be a blank row at the end of your table.
"Selection.End(xlDown).Select"
Google the above and see how you can use them. There are other options but these two will help you get started.
Kind regards
N