Hi,
I am using excel 2007. I have some cells in sheet 1 (made to look like a form) and i have created a macro to take the data from these cells and put them in a row on sheet 2. However, what i cannot figure out it what command i need to insert (and where) to have the data go to the next empty row.
This is what i have recorded on the macro:
Range("D9").Select
Selection.Copy
Sheets("Sheet2").Select
Range("A2").Select
ActiveSheet.Paste
Sheets("Sheet1").Select
Range("D11").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Sheet2").Select
Range("B2").Select
ActiveSheet.Paste
Sheets("Sheet1").Select
Range("D13").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Sheet2").Select
Range("C2").Select
ActiveSheet.Paste
Sheets("Sheet1").Select
Range("D15").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Sheet2").Select
Range("D2").Select
ActiveSheet.Paste
Sheets("Sheet1").Select
Range("D17").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Sheet2").Select
Range("E2").Select
ActiveSheet.Paste
Sheets("Sheet1").Select
Range("D19").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Sheet2").Select
Range("F2").Select
ActiveSheet.Paste
Sheets("Sheet1").Select
Range("D21").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Sheet2").Select
Range("G2").Select
ActiveSheet.Paste
Sheets("Sheet1").Select
Range("D23").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Sheet2").Select
Range("H2").Select
ActiveSheet.Paste
End Sub
Any help much appreciated!
I am using excel 2007. I have some cells in sheet 1 (made to look like a form) and i have created a macro to take the data from these cells and put them in a row on sheet 2. However, what i cannot figure out it what command i need to insert (and where) to have the data go to the next empty row.
This is what i have recorded on the macro:
Range("D9").Select
Selection.Copy
Sheets("Sheet2").Select
Range("A2").Select
ActiveSheet.Paste
Sheets("Sheet1").Select
Range("D11").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Sheet2").Select
Range("B2").Select
ActiveSheet.Paste
Sheets("Sheet1").Select
Range("D13").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Sheet2").Select
Range("C2").Select
ActiveSheet.Paste
Sheets("Sheet1").Select
Range("D15").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Sheet2").Select
Range("D2").Select
ActiveSheet.Paste
Sheets("Sheet1").Select
Range("D17").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Sheet2").Select
Range("E2").Select
ActiveSheet.Paste
Sheets("Sheet1").Select
Range("D19").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Sheet2").Select
Range("F2").Select
ActiveSheet.Paste
Sheets("Sheet1").Select
Range("D21").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Sheet2").Select
Range("G2").Select
ActiveSheet.Paste
Sheets("Sheet1").Select
Range("D23").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Sheet2").Select
Range("H2").Select
ActiveSheet.Paste
End Sub
Any help much appreciated!