#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 91
Default Data moving

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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 22,906
Default Data moving

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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 91
Default Data moving

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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 22,906
Default Data moving

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Moving a line chart data point revises data table value in Excel ' Ed Smith Charts and Charting in Excel 2 November 16th 12 01:03 PM
Moving Data between sheets in the same workbook and moving data between Workbooks. Alison Brown Excel Worksheet Functions 0 February 10th 09 01:03 AM
Moving data from one worksheet to another whilst removing the data Dobbin0_4[_2_] Excel Discussion (Misc queries) 2 September 17th 08 03:31 PM
moving data to non autofarmatted book changes data- Why? Josh Excel Discussion (Misc queries) 3 March 10th 06 09:16 PM
moving data in excel without deleting existing data jigna Excel Discussion (Misc queries) 1 January 30th 05 11:35 AM


All times are GMT +1. The time now is 05:58 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"