Forum Discussion
Nickmick321
Dec 21, 2023Copper Contributor
Add to sheet instead of overwrite
Hello, can someone help me? When i run the sub's underneath one after the other the second one overwrites the data that the first sub has written to the "op" sheet. How can i make so that the second...
djclements
Dec 21, 2023Silver Contributor
Nickmick321 Instead of starting with rw = 2, try either one of the following methods to locate the next available row in the output sheet:
rw = Sheets("op").Cells(1, 1).CurrentRegion.Rows.Count + 1
' OR
rw = Sheets("op").Cells(Sheets("op").Rows.Count, 1).End(xlUp).Row + 1