I need a macro to prompt for user defined row entry. Once that is accomplished it needs to simultaneously copy data from two specific columns (unique naming convention for the header - e.g., Ledger Code (Column D) and Cost (Column F)) from a neighboring workbook to columns J and Q to the target workbook (having the same header values). I have the macro for user defined row entry (below)...
Private Sub CommandButton1_Click()
noofrows = Application.InputBox(prompt:="How many to rows to insert", Type:=1)
Selection.Resize(noofrows, 1).EntireRow.Insert Shift:=xlDown
'Selection.Offset(1, 0).Resize(noOfRows, 1).EntireRow.Insert shift:=xlDown
End Sub
But I need additional code to accomplish the copy and paste. Help?
Private Sub CommandButton1_Click()
noofrows = Application.InputBox(prompt:="How many to rows to insert", Type:=1)
Selection.Resize(noofrows, 1).EntireRow.Insert Shift:=xlDown
'Selection.Offset(1, 0).Resize(noOfRows, 1).EntireRow.Insert shift:=xlDown
End Sub
But I need additional code to accomplish the copy and paste. Help?