Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
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 |
#2
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
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 On Wed, 31 Mar 2010 01:58:02 -0700, climate wrote: 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 |
#3
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Hi Gord
Your code work's correctly. Thank you very much regards climate "Gord Dibben" wrote: 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 On Wed, 31 Mar 2010 01:58:02 -0700, climate wrote: 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 . |
#4
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Good guess<g
Thanks for the feedback. Gord On Thu, 1 Apr 2010 09:53:01 -0700, climate wrote: Hi Gord Your code work's correctly. Thank you very much regards climate "Gord Dibben" wrote: 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 On Wed, 31 Mar 2010 01:58:02 -0700, climate wrote: 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 . |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Moving a line chart data point revises data table value in Excel ' | Charts and Charting in Excel | |||
Moving Data between sheets in the same workbook and moving data between Workbooks. | Excel Worksheet Functions | |||
Moving data from one worksheet to another whilst removing the data | Excel Discussion (Misc queries) | |||
moving data to non autofarmatted book changes data- Why? | Excel Discussion (Misc queries) | |||
moving data in excel without deleting existing data | Excel Discussion (Misc queries) |