Hello
I am trying to automate inserting of data. i have an insert button which is to copy the entries into relevant columns (see record macro below). the limitation with the macro below is when i insert new data entries it wipes out the previous one.
Sub insertdata2()'
' insertdata2 Macro
'
'
Range("C2,C4,C6,C8,C10").Select
Range("C10").Activate
Selection.Copy
Sheets("Data").Select
Range("A2").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=True
Range("A3").Select
Sheets("Sheet1").Select
Range("D8").Select
Application.CutCopyMode = False
Range("C2:C10").Select
Selection.ClearContents
Range("C2").Select
End Sub
Explanation:
Sheets("Data").Select
Range("A2").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=True
Range("A3").Select
After coping data from Sheet1, its to paste on Data, first selected cell (A2)
for continuity i was hoping next insert will be pasted on active cell A3 and then A4 etc.
Kindly assist.
Papare
I am trying to automate inserting of data. i have an insert button which is to copy the entries into relevant columns (see record macro below). the limitation with the macro below is when i insert new data entries it wipes out the previous one.
Sub insertdata2()'
' insertdata2 Macro
'
'
Range("C2,C4,C6,C8,C10").Select
Range("C10").Activate
Selection.Copy
Sheets("Data").Select
Range("A2").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=True
Range("A3").Select
Sheets("Sheet1").Select
Range("D8").Select
Application.CutCopyMode = False
Range("C2:C10").Select
Selection.ClearContents
Range("C2").Select
End Sub
Explanation:
Sheets("Data").Select
Range("A2").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=True
Range("A3").Select
After coping data from Sheet1, its to paste on Data, first selected cell (A2)
for continuity i was hoping next insert will be pasted on active cell A3 and then A4 etc.
Kindly assist.
Papare