Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
with Sheets("Weather Stations")
LastRow = .Range("A" & Rows.Count).End(xlup).Row NewRow = LastRow + 1 Sheets("TMY Analysis 3-6").Range("A2:I2").Copy _ Destination:=.Range("A" & NewRow) set NewDataRange = .Range("A" & LastRow & ":I" & NewRow) NewDataRange.PasteSpecial Paste:=xlPasteValues End With "liam.mccartney" wrote: 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. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Macro to update a column in a work based on another work sheet | New Users to Excel | |||
Macro works Macro does not work | Excel Discussion (Misc queries) | |||
Why Won't This Macro Work? | Excel Discussion (Misc queries) | |||
If I have a work sheet protected and try to run a macro to hide rows or columns it won't work. Correct? | Excel Programming | |||
Why does the macro not work? | Excel Worksheet Functions |