ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Macro undoes my work. Help. (https://www.excelbanter.com/excel-programming/429897-macro-undoes-my-work-help.html)

liam.mccartney[_2_]

Macro undoes my work. Help.
 
I'm attempting to use a recorded macro to streamline a rather tedious process.

the code looks like this:

Sheets("TMY Analysis 3-6").Select
Range("A2:I2").Select
Selection.Copy
Sheets("Weather Stations").Select
Range("A60:I60").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False
Range("A61").Select

Doesn't look terrible, except that I have to repeat this over 2000 times.

But my problem is that when I change some inputs and run the macro again it
overwrites what the macro wrote with the original inputs.

So my question is, how do I code the macro so that it moves on to the next
row of the sheet so when I use it again with inputs the new data is written
below the old data.

I'm compiling all this data into a single sheet to export to a .csv.


All times are GMT +1. The time now is 10:23 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com