Data moving

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
 
G

Gord Dibben

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top