Data moving

  • Thread starter Thread starter climate
  • Start date Start date
C

climate

I have many files.
Any file has data on column X and special range.
I need to a code when run it on any file, open Box similar to following:
response=InputBox("Enter new row number") and after i input row number,
then copy of data on column X and it's Range, paste to new row number on
sheet2.
Example for my first file: data on column X has Range (X2:X570),after run
code, new row number in Box is 7644,then, copy of data paste to sheet2 and
new Range
(X7644:X8214).

regards
 
You don't say which sheet has the original data in X2:X570 so I'll pick
Sheet1

Private Sub Workbook_Open()
Dim rng As Range
Set rng = Sheets("Sheet1").Range("X2:X570")
rownum = InputBox("enter a row number")
rng.Copy Destination:=Sheets("Sheet2").Range("X" & rownum)
End Sub


Gord Dibben MS Excel MVP
 
Back
Top