I have two worksheets in Excel, one is a formatted form named INPUT and that I want a user to enter their training plan and press a button to paste the records into a table on another worksheet named INPUT DATA. The process will repeat for new hires by adding them to the table without overwriting. Example
Can someone please explain how to loop the code? Here is the VBA code that I have:
Sub SubmitPlan()
'NAME
Sheets("Input").Select
Range("D7").Select
Selection.Copy
Sheets("Input Data").Select
Range("A1").Select
Selection.End(xlDown).Select
ActiveCell.Offset(1).Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
'HIREDATE
Sheets("Input").Select
Range("G7:H7").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Input Data").Select
ActiveCell.Offset(0,1).Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
'TRAINEETYPE
Sheets("Input").Select
Range("D10").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Input Data").Select
ActiveCell.Offset(0,1).Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
'VERIFY
Sheets("Input").Select
Range("B15").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Input Data").Select
Range("D1").Select
Selection.End(xlDown).Select
ActiveCell.Offset(1).Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
'LOOP REMAINING COLUMNS
For each cell in rng
Sheets("Input").Select
ActiveCell.Offset(0,1).Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Input Data").Select
ActiveCell.Offset(0,1).Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
End Sub
Thanks for your help:)
I've tried so many things but can't figure it out